This project is archived and is in readonly mode.
Tests should see all cookies, not just those that are created or changed in the controller
Reported by Craig Smith | June 5th, 2009 @ 04:16 PM | in 2.x
This test passes, even when the controller hasn't deleted the cookie. That's because cookies in a test case are only built up from the response and ignore the request.
def test_should_delete_the_cookie
@request.cookies['foo'] = 'bar get :do_something assert_nil
cookies['foo'] end
Comments and changes to this ticket
-
Repository October 14th, 2009 @ 10:59 PM
- State changed from new to committed
(from [316f4704eaa8aaba11e7ecebc1da9aa926fdd2d0]) Test cases should see all the cookies, not just cookies that have been set in the controller.
Previously this example would always pass, even when cookies.delete was not called.
@request.cookies['foo'] = 'bar' get :delete_cookie
assert_nil cookies['foo']Signed-off-by: Michael Koziarski michael@koziarski.com
[#2768 state:committed] http://github.com/rails/rails/commit/316f4704eaa8aaba11e7ecebc1da9a...
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
- Nobody is watching this ticket.
Attachments
Tags
Referenced by
- 2768 Tests should see all cookies, not just those that are created or changed in the controller Signed-off-by: Michael Koziarski michael@koziarski.com [#...