Skip to content

Instantly share code, notes, and snippets.

@mmack
Created December 10, 2009 13:52
Show Gist options
  • Save mmack/253341 to your computer and use it in GitHub Desktop.
Save mmack/253341 to your computer and use it in GitHub Desktop.
def test_logins
assert_equal @existingbob, User.authenticate("exbob@mcbob.com", "test") ## works
assert_equal @existingbob, User.authenticate("exbob@mcbob.com", "test1") ## works not -> <#<User id: 1000002, email: "exbob@mcbob.com", hashed_password: "77a0d943cdbace52716a9ef9fae12e45e2788d39", salt: "1000", updated_at: "2009-12-10 13:50:33", created_at: "2009-12-10 13:50:33">> expected but was <nil>.
assert_nil @existingbob, User.authenticate("exbob@mcbob.com", "test1") ## works also not !!!! -> <nil> expected but was <#<User id: 1000002, email: "exbob@mcbob.com", hashed_password: "77a0d943cdbace52716a9ef9fae12e45e2788d39", salt: "1000", updated_at: "2009-12-10 13:51:34", created_at: "2009-12-10 13:51:34">>.
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment