mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Use @existing_user
while updating existing user, fixing - #ee4e86
This commit is contained in:
parent
a041107bf5
commit
9bc91260ac
1 changed files with 6 additions and 6 deletions
|
@ -92,15 +92,15 @@ class SecurePasswordTest < ActiveModel::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
test "update an existing user with validations and valid password/confirmation" do
|
test "update an existing user with validations and valid password/confirmation" do
|
||||||
@user.password = 'password'
|
@existing_user.password = 'password'
|
||||||
@user.password_confirmation = 'password'
|
@existing_user.password_confirmation = 'password'
|
||||||
|
|
||||||
assert @user.valid?(:update), 'user should be valid'
|
assert @existing_user.valid?(:update), 'user should be valid'
|
||||||
|
|
||||||
@user.password = 'a' * 72
|
@existing_user.password = 'a' * 72
|
||||||
@user.password_confirmation = 'a' * 72
|
@existing_user.password_confirmation = 'a' * 72
|
||||||
|
|
||||||
assert @user.valid?(:update), 'user should be valid'
|
assert @existing_user.valid?(:update), 'user should be valid'
|
||||||
end
|
end
|
||||||
|
|
||||||
test "updating an existing user with validation and a blank password" do
|
test "updating an existing user with validation and a blank password" do
|
||||||
|
|
Loading…
Reference in a new issue