Forum: Ruby on Rails cookies testing

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.
Bd0ecd69dba2aab1a0261ee46e090139?d=identicon&s=25 Nicholas Wieland (Guest)
on 2007-02-21 00:28
(Received via mailing list)
I'm trying to read the expiration time of a cookie for testing, and
I'm puzzled because in this functional test both assertion pass ...

   def test_authentication_with_cookie
     post :login, :username => 'foo', :password =>
'passwd', :remember_me => '1'
     assert_not_nil user = User.find(:first, session[:user_id])
     assert_equal cookies[:auth_token], user.remember_token
     assert_equal cookies[:auth_token], user.remember_token_expiration

Someone has a clue of what's happening here ? ...

This topic is locked and can not be replied to.