]> git.openstreetmap.org Git - rails.git/blobdiff - test/integration/user_creation_test.rb
Localisation updates from https://translatewiki.net.
[rails.git] / test / integration / user_creation_test.rb
index e0a51e4d316dacb9e3126ef8ce1c313d1e15ef52..93e55939cc140fb024a33d3f2851e1b68e21c0c2 100644 (file)
@@ -1,8 +1,6 @@
 require "test_helper"
 
 class UserCreationTest < ActionDispatch::IntegrationTest
-  fixtures :users
-
   def setup
     I18n.locale = "en"
 
@@ -33,7 +31,7 @@ class UserCreationTest < ActionDispatch::IntegrationTest
 
   def test_user_create_submit_duplicate_email
     I18n.available_locales.each do |locale|
-      dup_email = users(:public_user).email
+      dup_email = create(:user).email
       display_name = "#{locale}_new_tester"
       assert_difference("User.count", 0) do
         assert_difference("ActionMailer::Base.deliveries.size", 0) do
@@ -52,7 +50,7 @@ class UserCreationTest < ActionDispatch::IntegrationTest
 
   def test_user_create_submit_duplicate_username
     I18n.available_locales.each do |locale|
-      dup_display_name = users(:public_user).display_name
+      dup_display_name = create(:user).display_name
       email = "#{locale}_new_tester"
       assert_difference("User.count", 0) do
         assert_difference("ActionMailer::Base.deliveries.size", 0) do
@@ -515,7 +513,7 @@ class UserCreationTest < ActionDispatch::IntegrationTest
         assert_redirected_to auth_path(:provider => "windowslive", :origin => "/user/new")
         follow_redirect!
         assert_response :redirect
-        assert_redirected_to auth_success_path(:provider => "windowslive", :origin => "/user/new")
+        assert_redirected_to auth_success_path(:provider => "windowslive")
         follow_redirect!
         assert_response :redirect
         assert_redirected_to "/user/terms"
@@ -546,7 +544,7 @@ class UserCreationTest < ActionDispatch::IntegrationTest
         assert_redirected_to auth_path(:provider => "windowslive", :origin => "/user/new")
         follow_redirect!
         assert_response :redirect
-        assert_redirected_to auth_success_path(:provider => "windowslive", :origin => "/user/new")
+        assert_redirected_to auth_success_path(:provider => "windowslive")
         follow_redirect!
         assert_response :redirect
         assert_redirected_to auth_failure_path(:strategy => "windowslive", :message => "connection_failed", :origin => "/user/new")
@@ -576,7 +574,7 @@ class UserCreationTest < ActionDispatch::IntegrationTest
         assert_redirected_to auth_path(:provider => "windowslive", :origin => "/user/new")
         follow_redirect!
         assert_response :redirect
-        assert_redirected_to auth_success_path(:provider => "windowslive", :origin => "/user/new")
+        assert_redirected_to auth_success_path(:provider => "windowslive")
         follow_redirect!
         assert_response :redirect
         assert_redirected_to "/user/terms"