I am following railstutorial.org 3rd Edition and I am currently working on Chapter 8: Log in, log out.
I found an issue in Listing 8.51 (login without remembering test):
assert_nil cookies['remember_token']
When I execute: rake test
, it's return RED with the following error:
FAIL["test_login_without_remembering", UsersLoginTest, 1.268578948]
test_login_without_remembering#UsersLoginTest (1.27s)
Expected "" to be nil.
test/integration/users_login_test.rb:46:in `block in <class:UsersLoginTest>'
Otherwise, when I change to the following code, it is returning GREEN and the Log In - Log out process work properly.
assert_not_nil cookies['remember_token']
Anyone who faces the same issue can explain this case?
Thank you.