The response used to be of type xml with empty body, which is not valid xml.
# user input checking, we don't have any UIDs < 1
raise OSM::APIBadUserInput, "invalid user ID" if user.to_i < 1
# user input checking, we don't have any UIDs < 1
raise OSM::APIBadUserInput, "invalid user ID" if user.to_i < 1
- u = User.find(user.to_i)
+ u = User.find_by(:id => user.to_i)
else
u = User.find_by(:display_name => name)
end
else
u = User.find_by(:display_name => name)
end
# not found when looking for changesets of non-existing users
get changesets_path(:user => User.maximum(:id) + 1)
assert_response :not_found
# not found when looking for changesets of non-existing users
get changesets_path(:user => User.maximum(:id) + 1)
assert_response :not_found
+ assert_equal "text/plain", @response.media_type
get changesets_path(:display_name => " ")
assert_response :not_found
get changesets_path(:display_name => " ")
assert_response :not_found
+ assert_equal "text/plain", @response.media_type
# can't get changesets of user 1 without authenticating
get changesets_path(:user => private_user.id)
# can't get changesets of user 1 without authenticating
get changesets_path(:user => private_user.id)