aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch/test_request_test.rb
diff options
context:
space:
mode:
authorAndrew White <andyw@pixeltrix.co.uk>2011-03-06 12:49:44 +0000
committerAndrew White <andyw@pixeltrix.co.uk>2011-03-06 12:49:44 +0000
commit31f09f9dbc1b8e598fc82d86b622167bfc01d18a (patch)
tree8568ac4781f047ab912f873b226ac4ee13df7717 /actionpack/test/dispatch/test_request_test.rb
parente00867bc437b6a681491ef59e13423051e6d98f0 (diff)
downloadrails-31f09f9dbc1b8e598fc82d86b622167bfc01d18a.tar.gz
rails-31f09f9dbc1b8e598fc82d86b622167bfc01d18a.tar.bz2
rails-31f09f9dbc1b8e598fc82d86b622167bfc01d18a.zip
Improve testing of cookies in functional tests:
- cookies can be set using string or symbol keys - cookies are preserved across calls to get, post, etc. - cookie names and values are escaped - cookies can be cleared using @request.cookies.clear [#6272 state:resolved]
Diffstat (limited to 'actionpack/test/dispatch/test_request_test.rb')
-rw-r--r--actionpack/test/dispatch/test_request_test.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/test/dispatch/test_request_test.rb b/actionpack/test/dispatch/test_request_test.rb
index e42ade73d1..81a8c24525 100644
--- a/actionpack/test/dispatch/test_request_test.rb
+++ b/actionpack/test/dispatch/test_request_test.rb
@@ -36,10 +36,10 @@ class TestRequestTest < ActiveSupport::TestCase
req.cookies["user_name"] = "david"
assert_equal({"user_name" => "david"}, req.cookies)
- assert_equal "user_name=david;", req.env["HTTP_COOKIE"]
+ assert_equal "user_name=david", req.env["HTTP_COOKIE"]
req.cookies["login"] = "XJ-122"
assert_equal({"user_name" => "david", "login" => "XJ-122"}, req.cookies)
- assert_equal %w(login=XJ-122 user_name=david), req.env["HTTP_COOKIE"].split(/; ?/).sort
+ assert_equal %w(login=XJ-122 user_name=david), req.env["HTTP_COOKIE"].split(/; /).sort
end
end