Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class UserTest << Test::Unit::TestCase
- def test_nil_password
- user = User.create! :email => 'someone@example.com', :password => 'secret', :password_confirmation => 'secret'
- user.update_attributes :password => nil
- assert_equal user, User.authenticate('someone@example.com', 'secret'), "Should not update password"
- end
- end
Add Comment
Please, Sign In to add comment