X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/0a9dc1651e1476c904d9172bf9f522b9b18a779a..407a5f218ca3e2bae6fdd2b8c06a73388d490ddf:/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 4ed7e7f77..5086a09b3 100644 --- a/test/controllers/api/users_controller_test.rb +++ b/test/controllers/api/users_controller_test.rb @@ -164,7 +164,7 @@ module Api assert_response :unauthorized # check that we get a response when logged in - auth_header = basic_authorization_header user.email, "test" + auth_header = bearer_authorization_header user get user_details_path, :headers => auth_header assert_response :success assert_equal "application/xml", response.media_type @@ -173,7 +173,7 @@ module Api check_xml_details(user, true, false) # check that data is returned properly in json - auth_header = basic_authorization_header user.email, "test" + auth_header = bearer_authorization_header user get user_details_path(:format => "json"), :headers => auth_header assert_response :success assert_equal "application/json", response.media_type @@ -427,7 +427,7 @@ module Api assert_response :unauthorized # check that we get a response when logged in - auth_header = basic_authorization_header user.email, "test" + auth_header = bearer_authorization_header user get user_gpx_files_path, :headers => auth_header assert_response :success assert_equal "application/xml", response.media_type