X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/281d7992f857e7e7c64947a06470898c35035bb6..2479319b7859d9b271dc8900e5d530c77976025a:/test/integration/user_creation_test.rb diff --git a/test/integration/user_creation_test.rb b/test/integration/user_creation_test.rb index 4d9bca7bf..8b6b3ef3c 100644 --- a/test/integration/user_creation_test.rb +++ b/test/integration/user_creation_test.rb @@ -7,7 +7,6 @@ class UserCreationTest < ActionDispatch::IntegrationTest OmniAuth.config.test_mode = true stub_request(:get, /.*gravatar.com.*d=404/).to_return(:status => 404) - stub_hostip_requests end def teardown @@ -33,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 @@ -51,8 +50,8 @@ 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.form-row > input.field_with_errors#user_email" + assert_equal locale.to_s, response.headers["Content-Language"] + assert_select "form > fieldset > div.standard-form-row > input.field_with_errors#user_email" assert_no_missing_translations end end @@ -76,7 +75,7 @@ class UserCreationTest < ActionDispatch::IntegrationTest end assert_response :success assert_template "users/new" - assert_select "form > fieldset > div.form-row > input.field_with_errors#user_display_name" + assert_select "form > fieldset > div.standard-form-row > input.field_with_errors#user_display_name" assert_no_missing_translations end end @@ -158,7 +157,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