diff options
author | Akshay Vishnoi <akshay.vishnoi@vinsol.com> | 2014-06-14 14:42:52 +0530 |
---|---|---|
committer | Akshay Vishnoi <akshay.vishnoi@vinsol.com> | 2014-06-14 14:42:52 +0530 |
commit | 9bc91260ac427aa3f380e149dfb29ab5584cded4 (patch) | |
tree | 163e07ca2f66ba01d72573be13e51bf62dbc3f0b /activemodel | |
parent | a041107bf50d42ca92d41c89355ba663d700af48 (diff) | |
download | rails-9bc91260ac427aa3f380e149dfb29ab5584cded4.tar.gz rails-9bc91260ac427aa3f380e149dfb29ab5584cded4.tar.bz2 rails-9bc91260ac427aa3f380e149dfb29ab5584cded4.zip |
Use `@existing_user` while updating existing user, fixing - #ee4e86
Diffstat (limited to 'activemodel')
-rw-r--r-- | activemodel/test/cases/secure_password_test.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/activemodel/test/cases/secure_password_test.rb b/activemodel/test/cases/secure_password_test.rb index 40a5de3367..e59f00c8c5 100644 --- a/activemodel/test/cases/secure_password_test.rb +++ b/activemodel/test/cases/secure_password_test.rb @@ -92,15 +92,15 @@ class SecurePasswordTest < ActiveModel::TestCase end test "update an existing user with validations and valid password/confirmation" do - @user.password = 'password' - @user.password_confirmation = 'password' + @existing_user.password = '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 - @user.password_confirmation = 'a' * 72 + @existing_user.password = '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 test "updating an existing user with validation and a blank password" do |