]> git.openstreetmap.org Git - rails.git/commitdiff
Refactor api_controller tests to avoid users fixtures.
authorAndy Allan <git@gravitystorm.co.uk>
Wed, 22 Feb 2017 11:03:39 +0000 (11:03 +0000)
committerAndy Allan <git@gravitystorm.co.uk>
Wed, 22 Feb 2017 11:03:39 +0000 (11:03 +0000)
test/controllers/api_controller_test.rb

index 540f303ed9c386655d92cb60d79eda4b7a4aa8e4..d94312f4bade28871cf3d2b19794d896f2aaa526 100644 (file)
@@ -382,7 +382,7 @@ class ApiControllerTest < ActionController::TestCase
   end
 
   def test_permissions_basic_auth
-    basic_authorization(users(:normal_user).email, "test")
+    basic_authorization(create(:normal_user).email, "test")
     get :permissions
     assert_response :success
     assert_select "osm > permissions", :count => 1 do