Listing 9.25
Rob117 opened this issue · 0 comments
Rob117 commented
test "login without remembering" do log_in_as(@user, remember_me: '0') assert_nil cookies['remember_token'] end
The assert_nil line throws an error because cookies.delete (called in the log_in_as helper method under logout(user)) simply sets the value to "" until the browser is closed. Because in Ruby "".nil? is false, the test is not passing.