Guest User

Untitled

a guest
Oct 29th, 2017
424
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. class UserTest << Test::Unit::TestCase
  2. def test_nil_password
  3. user = User.create! :email => 'someone@example.com', :password => 'secret', :password_confirmation => 'secret'
  4.  
  5. user.update_attributes :password => nil
  6.  
  7. assert_equal user, User.authenticate('someone@example.com', 'secret'), "Should not update password"
  8. end
  9. end
Add Comment
Please, Sign In to add comment