Displaying 1 result from an estimated 1 matches for "test_password_hash".
Did you mean:
set_password_hash
2005 Jul 13
0
Testing failing
...name and
hashed_password to. I used the method in the Rails book to handle
hashing the password. My code is strait out of the book. The whole
object is at the end of this email.
I want to test to make sure the hashed_password gets written out to
the database, so I wrote this test
def test_password_hash
@hash_pass = "something"
@profile_ron.password = @hash_pass
assert @profile_ron.save
@profile_ron.reload
assert_equal Digest::SHA1.hexdigest( @hash_pass ),
@profile_ron.hashed_password
end
The problem is that @profile_ron.hashed_passwor...