aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch/test_request_test.rb
diff options
context:
space:
mode:
authorAndrew White <andyw@pixeltrix.co.uk>2011-06-05 12:03:04 +0100
committerAndrew White <andyw@pixeltrix.co.uk>2011-06-05 12:03:31 +0100
commit0a9270417c8eb03891ec161622bcf81e5cb8af02 (patch)
tree434ba1ad1a3a2dcff1572050af9302603ecace87 /actionpack/test/dispatch/test_request_test.rb
parent523c7c233052a3f3e1ac99adad4aad66f33a9364 (diff)
downloadrails-0a9270417c8eb03891ec161622bcf81e5cb8af02.tar.gz
rails-0a9270417c8eb03891ec161622bcf81e5cb8af02.tar.bz2
rails-0a9270417c8eb03891ec161622bcf81e5cb8af02.zip
Ensure cookie keys are strings
Diffstat (limited to 'actionpack/test/dispatch/test_request_test.rb')
-rw-r--r--actionpack/test/dispatch/test_request_test.rb9
1 files changed, 9 insertions, 0 deletions
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