提交 5e3e5ac1 编写于 作者: J Jeremy Kemper

Clarify cookie jar test

上级 7c785592
......@@ -284,18 +284,13 @@ def test_post
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
self.cookies['cookie_1'] = "sugar"
self.cookies['cookie_2'] = "oatmeal"
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"=>"", "cookie_2"=>"oatmeal", "cookie_3"=>"chocolate"}, cookies.to_hash)
assert_equal "Gone", response.body
end
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册