Permalink
Browse files

assert nothing raised for setting a cookie value to nil in ActionDisp…

…atch
  • Loading branch information...
bfolkens committed Jul 14, 2011
1 parent db0a65c commit 4755930727b3a82f5573c487f4289759d3822735
Showing with 5 additions and 0 deletions.
  1. +5 −0 actionpack/test/dispatch/test_request_test.rb
@@ -40,6 +40,11 @@ class TestRequestTest < ActiveSupport::TestCase
req.cookie_jar["login"] = "XJ-122"
assert_cookies({"user_name" => "david", "login" => "XJ-122"}, req.cookie_jar)
+ assert_nothing_raised do
+ req.cookie_jar["login"] = nil
+ assert_cookies({"user_name" => "david", "login" => nil}, req.cookie_jar)
+ end
+
req.cookie_jar.delete(:login)
assert_cookies({"user_name" => "david"}, req.cookie_jar)

0 comments on commit 4755930

Please sign in to comment.