Skip to content
Browse files

Merge pull request #15717 from akshay-vishnoi/test-cases

Use `@existing_user` while updating existing user, fixing - ee4e86
  • Loading branch information...
2 parents eb87074 + 9bc9126 commit 34221cdcab7d145d22029174a990b3971616cc80 @chancancode chancancode committed Jun 14, 2014
Showing with 6 additions and 6 deletions.
  1. +6 −6 activemodel/test/cases/secure_password_test.rb
View
12 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 34221cd

Please sign in to comment.
Something went wrong with that request. Please try again.