Permalink
Browse files

Use `@existing_user` while updating existing user, fixing - #ee4e86

  • Loading branch information...
Akshay Vishnoi
Akshay Vishnoi committed Jun 14, 2014
1 parent a041107 commit 9bc91260ac427aa3f380e149dfb29ab5584cded4
Showing with 6 additions and 6 deletions.
  1. +6 −6 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

0 comments on commit 9bc9126

Please sign in to comment.