]> git.openstreetmap.org Git - rails.git/blobdiff - test/controllers/api/users_controller_test.rb
Merge remote-tracking branch 'upstream/pull/5152'
[rails.git] / test / controllers / api / users_controller_test.rb
index 4ed7e7f77643931bb8e526bff992ee2e96ed3314..5086a09b3c217b0010d198c1370d4596c7c656bc 100644 (file)
@@ -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