aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch/session/cookie_store_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/dispatch/session/cookie_store_test.rb')
-rw-r--r--actionpack/test/dispatch/session/cookie_store_test.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/session/cookie_store_test.rb b/actionpack/test/dispatch/session/cookie_store_test.rb
index 27f55fd7ab..b0efbcef4a 100644
--- a/actionpack/test/dispatch/session/cookie_store_test.rb
+++ b/actionpack/test/dispatch/session/cookie_store_test.rb
@@ -50,6 +50,11 @@ class CookieStoreTest < ActionDispatch::IntegrationTest
get_session_id
end
+ def renew_session_id
+ request.session_options[:renew] = true
+ head :ok
+ end
+
def rescue_action(e) raise end
end
@@ -102,6 +107,17 @@ class CookieStoreTest < ActionDispatch::IntegrationTest
end
end
+ def test_properly_renew_cookies
+ with_test_route_set do
+ get '/set_session_value'
+ get '/persistent_session_id'
+ session_id = response.body
+ get '/renew_session_id'
+ get '/persistent_session_id'
+ assert_not_equal response.body, session_id
+ end
+ end
+
def test_does_set_secure_cookies_over_https
with_test_route_set(:secure => true) do
get '/set_session_value', nil, 'HTTPS' => 'on'