aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch/cookies_test.rb
diff options
context:
space:
mode:
authorJon Moss <me@jonathanmoss.me>2016-11-22 16:25:44 -0500
committerJon Moss <me@jonathanmoss.me>2016-12-11 14:37:18 -0500
commit78c6c4b24810e505921d0bb3575c7a59e416c268 (patch)
tree545f4da349ee1019d138941188e73b81d7849b34 /actionpack/test/dispatch/cookies_test.rb
parent7e9ae610a22f191df1337e6d05cdd9c0bcdee571 (diff)
downloadrails-78c6c4b24810e505921d0bb3575c7a59e416c268.tar.gz
rails-78c6c4b24810e505921d0bb3575c7a59e416c268.tar.bz2
rails-78c6c4b24810e505921d0bb3575c7a59e416c268.zip
Do not clear HTTP_COOKIES header after request
Diffstat (limited to 'actionpack/test/dispatch/cookies_test.rb')
-rw-r--r--actionpack/test/dispatch/cookies_test.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/cookies_test.rb b/actionpack/test/dispatch/cookies_test.rb
index af3036d448..bf146a5c39 100644
--- a/actionpack/test/dispatch/cookies_test.rb
+++ b/actionpack/test/dispatch/cookies_test.rb
@@ -272,6 +272,10 @@ class CookiesTest < ActionController::TestCase
def noop
head :ok
end
+
+ def encrypted_cookie
+ cookies.encrypted["foo"]
+ end
end
tests TestController
@@ -1189,6 +1193,12 @@ class CookiesTest < ActionController::TestCase
assert_equal "david", cookies[:user_name]
end
+ def test_cookies_are_not_cleared
+ cookies.encrypted["foo"] = "bar"
+ get :noop
+ assert_equal "bar", @controller.encrypted_cookie
+ end
+
private
def assert_cookie_header(expected)
header = @response.headers["Set-Cookie"]