]> git.openstreetmap.org Git - rails.git/blobdiff - test/integration/user_login_test.rb
Extract the hostip.info stubbing into a common method.
[rails.git] / test / integration / user_login_test.rb
index 5652955c75fafa30e5f0d7e1147e75134b4c9109..d027334d0d3cad5b85eff9b2903334854b8e8dcd 100644 (file)
@@ -1,7 +1,7 @@
 require "test_helper"
 
 class UserLoginTest < ActionDispatch::IntegrationTest
-  fixtures :users
+  fixtures :users, :user_roles
 
   def setup
     OmniAuth.config.test_mode = true
@@ -555,7 +555,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest
     assert_template "changeset/history"
     assert_select "span.username", "openIDuser"
 
-    user = User.find_by_display_name("openIDuser")
+    user = User.find_by(:display_name => "openIDuser")
     assert_equal "google", user.auth_provider
     assert_equal "987654321", user.auth_uid
   end