diff options
author | Rick Olson <technoweenie@gmail.com> | 2007-10-20 17:30:01 +0000 |
---|---|---|
committer | Rick Olson <technoweenie@gmail.com> | 2007-10-20 17:30:01 +0000 |
commit | c9fecf20ffb051ebc9270bfd787fd2964349d19a (patch) | |
tree | 454db11b153b9d8383e044f4dad7153182a2042f /actionpack/test | |
parent | 17ac677a2d8383812769640bcc15bd82141f29ee (diff) | |
download | rails-c9fecf20ffb051ebc9270bfd787fd2964349d19a.tar.gz rails-c9fecf20ffb051ebc9270bfd787fd2964349d19a.tar.bz2 rails-c9fecf20ffb051ebc9270bfd787fd2964349d19a.zip |
Ensure that cookies handle array values correctly. Closes #9937 [queso]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7978 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/controller/cookie_test.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/actionpack/test/controller/cookie_test.rb b/actionpack/test/controller/cookie_test.rb index 6722711c56..80799e1c05 100644 --- a/actionpack/test/controller/cookie_test.rb +++ b/actionpack/test/controller/cookie_test.rb @@ -18,7 +18,7 @@ class CookieTest < Test::Unit::TestCase cookies["user_name"] = { "value" => "david", "expires" => Time.local(2005, 10, 10) } cookies["login"] = "XJ-122" end - + def access_frozen_cookies cookies["will"] = "work" end @@ -92,6 +92,14 @@ class CookieTest < Test::Unit::TestCase assert_equal nil, jar["something_else"] end + def test_cookiejar_accessor_with_array_value + a = %w{1 2 3} + @request.cookies["pages"] = CGI::Cookie.new("name" => "pages", "value" => a, "expires" => Time.local(2025, 10, 10)) + @controller.request = @request + jar = ActionController::CookieJar.new(@controller) + assert_equal a, jar["pages"] + end + def test_delete_cookie_with_path get :delete_cookie_with_path assert_equal "/beaten", @response.headers["cookie"].first.path |