From 0a9270417c8eb03891ec161622bcf81e5cb8af02 Mon Sep 17 00:00:00 2001 From: Andrew White Date: Sun, 5 Jun 2011 12:03:04 +0100 Subject: Ensure cookie keys are strings --- actionpack/test/dispatch/test_request_test.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'actionpack/test/dispatch/test_request_test.rb') diff --git a/actionpack/test/dispatch/test_request_test.rb b/actionpack/test/dispatch/test_request_test.rb index c520fb59ec..aa115608ef 100644 --- a/actionpack/test/dispatch/test_request_test.rb +++ b/actionpack/test/dispatch/test_request_test.rb @@ -39,6 +39,15 @@ class TestRequestTest < ActiveSupport::TestCase req.cookie_jar["login"] = "XJ-122" assert_cookies({"user_name" => "david", "login" => "XJ-122"}, req.cookie_jar) + + req.cookie_jar.delete(:login) + assert_cookies({"user_name" => "david"}, req.cookie_jar) + + req.cookie_jar.clear + assert_cookies({}, req.cookie_jar) + + req.cookie_jar.update(:user_name => "david") + assert_cookies({"user_name" => "david"}, req.cookie_jar) end private -- cgit v1.2.3