diff --git a/test/integration/recoverable_test.rb b/test/integration/recoverable_test.rb index 28781e5e..98acd056 100644 --- a/test/integration/recoverable_test.rb +++ b/test/integration/recoverable_test.rb @@ -153,7 +153,7 @@ class PasswordTest < ActionDispatch::IntegrationTest assert_response :success assert_current_url '/users/password' assert_have_selector '#error_explanation' - assert_contain 'Password doesn\'t match confirmation' + assert_contain 'Password confirmation doesn\'t match Password' assert_not user.reload.valid_password?('987654321') end diff --git a/test/integration/registerable_test.rb b/test/integration/registerable_test.rb index 9583097f..34703c69 100644 --- a/test/integration/registerable_test.rb +++ b/test/integration/registerable_test.rb @@ -100,7 +100,7 @@ class RegistrationTest < ActionDispatch::IntegrationTest assert_template 'registrations/new' assert_have_selector '#error_explanation' assert_contain "Email is invalid" - assert_contain "Password doesn't match confirmation" + assert_contain "Password confirmation doesn't match Password" assert_contain "2 errors prohibited" assert_nil User.first @@ -206,7 +206,7 @@ class RegistrationTest < ActionDispatch::IntegrationTest fill_in 'current password', :with => '12345678' click_button 'Update' - assert_contain "Password doesn't match confirmation" + assert_contain "Password confirmation doesn't match Password" assert_not User.first.valid_password?('pas123') end diff --git a/test/models/validatable_test.rb b/test/models/validatable_test.rb index 10be9092..0008aed4 100644 --- a/test/models/validatable_test.rb +++ b/test/models/validatable_test.rb @@ -56,7 +56,7 @@ class ValidatableTest < ActiveSupport::TestCase test 'should require confirmation to be set when creating a new record' do user = new_user(:password => 'new_password', :password_confirmation => 'blabla') assert user.invalid? - assert_equal 'doesn\'t match confirmation', user.errors[:password].join + assert_equal 'doesn\'t match Password', user.errors[:password_confirmation].join end test 'should require password when updating/reseting password' do @@ -73,7 +73,7 @@ class ValidatableTest < ActiveSupport::TestCase user = create_user user.password_confirmation = 'another_password' assert user.invalid? - assert_equal 'doesn\'t match confirmation', user.errors[:password].join + assert_equal 'doesn\'t match Password', user.errors[:password_confirmation].join end test 'should require a password with minimum of 6 characters' do