X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/350ac303f167002a4edc0853259e8793e879c91d..e210b4efbf6ab7fa2e89a88bf6e0ab666cb4f6fd:/test/controllers/api/users_controller_test.rb diff --git a/test/controllers/api/users_controller_test.rb b/test/controllers/api/users_controller_test.rb index cb2c75205..aa4bf1e9d 100644 --- a/test/controllers/api/users_controller_test.rb +++ b/test/controllers/api/users_controller_test.rb @@ -419,13 +419,19 @@ module Api check_json_details(js["users"][1], user3, false, false) get api_users_path, :params => { :users => create(:user, :suspended).id } - assert_response :not_found + assert_response :success + assert_equal "application/xml", response.media_type + assert_select "user", :count => 0 get api_users_path, :params => { :users => create(:user, :deleted).id } - assert_response :not_found + assert_response :success + assert_equal "application/xml", response.media_type + assert_select "user", :count => 0 get api_users_path, :params => { :users => 0 } - assert_response :not_found + assert_response :success + assert_equal "application/xml", response.media_type + assert_select "user", :count => 0 end def test_index_oauth1 @@ -506,13 +512,19 @@ module Api check_json_details(js["users"][1], user3, false, false) signed_get api_users_path, :params => { :users => create(:user, :suspended).id }, :oauth => { :token => good_token } - assert_response :not_found + assert_response :success + assert_equal "application/xml", response.media_type + assert_select "user", :count => 0 signed_get api_users_path, :params => { :users => create(:user, :deleted).id }, :oauth => { :token => good_token } - assert_response :not_found + assert_response :success + assert_equal "application/xml", response.media_type + assert_select "user", :count => 0 signed_get api_users_path, :params => { :users => 0 }, :oauth => { :token => good_token } - assert_response :not_found + assert_response :success + assert_equal "application/xml", response.media_type + assert_select "user", :count => 0 end def test_index_oauth2 @@ -593,13 +605,19 @@ module Api check_json_details(js["users"][1], user3, false, false) get api_users_path, :params => { :users => create(:user, :suspended).id }, :headers => bearer_authorization_header(good_token.token) - assert_response :not_found + assert_response :success + assert_equal "application/xml", response.media_type + assert_select "user", :count => 0 get api_users_path, :params => { :users => create(:user, :deleted).id }, :headers => bearer_authorization_header(good_token.token) - assert_response :not_found + assert_response :success + assert_equal "application/xml", response.media_type + assert_select "user", :count => 0 get api_users_path, :params => { :users => 0 }, :headers => bearer_authorization_header(good_token.token) - assert_response :not_found + assert_response :success + assert_equal "application/xml", response.media_type + assert_select "user", :count => 0 end def test_gpx_files