From ce96c5b30b52a1b2d1628d6e605e7989f9eea023 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sat, 2 Apr 2005 08:54:25 +0000 Subject: Added assert_no_cookie and fixed assert_cookie_equal to deal with non-existing cookies #979 [bitsweat] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1065 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/test/controller/cookie_test.rb | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'actionpack/test/controller') diff --git a/actionpack/test/controller/cookie_test.rb b/actionpack/test/controller/cookie_test.rb index 2b5b1cae9f..f0189ebb11 100644 --- a/actionpack/test/controller/cookie_test.rb +++ b/actionpack/test/controller/cookie_test.rb @@ -28,6 +28,11 @@ class CookieTest < Test::Unit::TestCase render_text "hello world" end + def access_frozen_cookies + @cookies["will"] = "work" + render_text "hello world" + end + def rescue_action(e) raise end end @@ -63,8 +68,13 @@ class CookieTest < Test::Unit::TestCase assert_equal 2, process_request.headers["cookie"].size end + def test_setting_test_cookie + @request.action = "access_frozen_cookies" + assert_nothing_raised { process_request } + end + private def process_request TestController.process(@request, @response) end -end \ No newline at end of file +end -- cgit v1.2.3