]> git.openstreetmap.org Git - rails.git/blobdiff - test/integration/user_creation_test.rb
Merge remote-tracking branch 'upstream/pull/3065'
[rails.git] / test / integration / user_creation_test.rb
index b825990b8153293809393ce0c17384fdf2b33837..f331a4b98130fb2de48eec46d2b4c81ad8f9e552 100644 (file)
@@ -32,7 +32,7 @@ class UserCreationTest < ActionDispatch::IntegrationTest
   end
 
   def test_user_create_submit_duplicate_email
-    I18n.available_locales.each do |locale|
+    Locale.available.each do |locale|
       dup_email = create(:user).email
       display_name = "#{locale}_new_tester"
       assert_difference("User.count", 0) do
@@ -50,8 +50,9 @@ class UserCreationTest < ActionDispatch::IntegrationTest
       end
       assert_response :success
       assert_template "users/new"
-      assert_equal locale.to_s, response.headers["Content-Language"] unless locale == :root
-      assert_select "form > fieldset > div.standard-form-row > input.field_with_errors#user_email"
+      assert_equal locale.to_s, response.headers["Content-Language"]
+      assert_select "form"
+      assert_select "form > div.form-group > input.is-invalid#user_email"
       assert_no_missing_translations
     end
   end
@@ -75,7 +76,7 @@ class UserCreationTest < ActionDispatch::IntegrationTest
       end
       assert_response :success
       assert_template "users/new"
-      assert_select "form > fieldset > div.standard-form-row > input.field_with_errors#user_display_name"
+      assert_select "form > div.form-group > input.is-invalid#user_display_name"
       assert_no_missing_translations
     end
   end
@@ -157,7 +158,7 @@ class UserCreationTest < ActionDispatch::IntegrationTest
   end
 
   # Check that the user can successfully recover their password
-  def lost_password_recovery_success
+  def test_lost_password_recovery_success
     # Open the lost password form
     # Submit the lost password form
     # Check the e-mail