aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/cookie_test.rb
diff options
context:
space:
mode:
authorRich Cavanaugh <cavanaugh@fatjam.com>2008-05-12 15:25:56 -0700
committerJeremy Kemper <jeremy@bitsweat.net>2008-05-12 15:26:19 -0700
commita425cd147363a0e8d7e17177ef252dd760197f15 (patch)
treed992a97129c45fe67028e8ba372164cd4ca03568 /actionpack/test/controller/cookie_test.rb
parentcde6a259bf46cdaf1f2fe5fdeb84478ca8fc3046 (diff)
downloadrails-a425cd147363a0e8d7e17177ef252dd760197f15.tar.gz
rails-a425cd147363a0e8d7e17177ef252dd760197f15.tar.bz2
rails-a425cd147363a0e8d7e17177ef252dd760197f15.zip
Don't double-escape cookie store data. Don't split cookie values with newlines into an array. [#130 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
Diffstat (limited to 'actionpack/test/controller/cookie_test.rb')
-rw-r--r--actionpack/test/controller/cookie_test.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/actionpack/test/controller/cookie_test.rb b/actionpack/test/controller/cookie_test.rb
index 42f3bd26a4..b8f3c629f4 100644
--- a/actionpack/test/controller/cookie_test.rb
+++ b/actionpack/test/controller/cookie_test.rb
@@ -137,4 +137,9 @@ class CookieTest < Test::Unit::TestCase
cookies = CGI::Cookie.parse('return_to=http://rubyonrails.org/search?term=api&scope=all&global=true')
assert_equal({"return_to" => ["http://rubyonrails.org/search?term=api&scope=all&global=true"]}, cookies)
end
+
+ def test_cookies_should_not_be_split_on_values_with_newlines
+ cookies = CGI::Cookie.new("name" => "val", "value" => "this\nis\na\ntest")
+ assert cookies.size == 1
+ end
end