mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Clarify cookie jar test
This commit is contained in:
parent
7c785592ec
commit
5e3e5ac12b
1 changed files with 1 additions and 6 deletions
|
@ -284,18 +284,13 @@ class IntegrationProcessTest < ActionController::IntegrationTest
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_cookie_monster
|
test 'response cookies are added to the cookie jar for the next request' do
|
||||||
with_test_route_set do
|
with_test_route_set do
|
||||||
self.cookies['cookie_1'] = "sugar"
|
self.cookies['cookie_1'] = "sugar"
|
||||||
self.cookies['cookie_2'] = "oatmeal"
|
self.cookies['cookie_2'] = "oatmeal"
|
||||||
get '/cookie_monster'
|
get '/cookie_monster'
|
||||||
assert_equal 410, status
|
|
||||||
assert_equal "Gone", status_message
|
|
||||||
assert_response 410
|
|
||||||
assert_response :gone
|
|
||||||
assert_equal "cookie_1=; path=/\ncookie_3=chocolate; path=/", headers["Set-Cookie"]
|
assert_equal "cookie_1=; path=/\ncookie_3=chocolate; path=/", headers["Set-Cookie"]
|
||||||
assert_equal({"cookie_1"=>"", "cookie_2"=>"oatmeal", "cookie_3"=>"chocolate"}, cookies.to_hash)
|
assert_equal({"cookie_1"=>"", "cookie_2"=>"oatmeal", "cookie_3"=>"chocolate"}, cookies.to_hash)
|
||||||
assert_equal "Gone", response.body
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue