From 9bc91260ac427aa3f380e149dfb29ab5584cded4 Mon Sep 17 00:00:00 2001 From: Akshay Vishnoi Date: Sat, 14 Jun 2014 14:42:52 +0530 Subject: Use `@existing_user` while updating existing user, fixing - #ee4e86 --- activemodel/test/cases/secure_password_test.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'activemodel') 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 -- cgit v1.2.3