Forum: Ruby on Rails restful-authentication and unit tests

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Hans M. (Guest)
on 2009-02-08 01:46
(Received via mailing list)
There are two unit tests in restful-authentication that fails for me
as User.authenticate returns nil

def test_should_reset_password
   users(:quentin).update_attributes(:password =>
'new_password', :password_confirmation => 'new_password')
   assert_equal users(:quentin), User.authenticate('quentin',

def test_should_not_rehash_password
  users(:quentin).update_attributes(:login => 'quentin2')
  assert_equal users(:quentin), User.authenticate('quentin2',

However, should it really be possible just to change password? At
least in the older version one had to generate at new user, I think.
That is the test should assert errors instead. The same holds for the
second test . Should it not assert errors instead of equal ?

Anyone that has had the same problem ?

Any help would be appreciated
This topic is locked and can not be replied to.