Fix changed error messages from confirmation validation
This commit is contained in:
parent
9ae013ae3c
commit
3c885e043d
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue