aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel
diff options
context:
space:
mode:
authorGodfrey Chan <godfreykfc@gmail.com>2014-06-14 02:41:49 -0700
committerGodfrey Chan <godfreykfc@gmail.com>2014-06-14 02:41:49 -0700
commit34221cdcab7d145d22029174a990b3971616cc80 (patch)
tree9f0862b6bb8c11c46f60715a8646d34f353f518a /activemodel
parenteb87074e0b73dcb80e8d47cbcfe355f8bdef8428 (diff)
parent9bc91260ac427aa3f380e149dfb29ab5584cded4 (diff)
downloadrails-34221cdcab7d145d22029174a990b3971616cc80.tar.gz
rails-34221cdcab7d145d22029174a990b3971616cc80.tar.bz2
rails-34221cdcab7d145d22029174a990b3971616cc80.zip
Merge pull request #15717 from akshay-vishnoi/test-cases
Use `@existing_user` while updating existing user, fixing - ee4e86
Diffstat (limited to 'activemodel')
-rw-r--r--activemodel/test/cases/secure_password_test.rb12
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