diff options
Diffstat (limited to 'actionpack/test/dispatch/session/cookie_store_test.rb')
-rw-r--r-- | actionpack/test/dispatch/session/cookie_store_test.rb | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/actionpack/test/dispatch/session/cookie_store_test.rb b/actionpack/test/dispatch/session/cookie_store_test.rb index e99ff46edf..2194efa503 100644 --- a/actionpack/test/dispatch/session/cookie_store_test.rb +++ b/actionpack/test/dispatch/session/cookie_store_test.rb @@ -86,7 +86,7 @@ class CookieStoreTest < ActionDispatch::IntegrationTest cookies[SessionKey] = SignedBar get '/persistent_session_id' assert_response :success - assert_equal response.body.size, 32 + assert_equal 32, response.body.size session_id = response.body get '/get_session_id' @@ -125,7 +125,7 @@ class CookieStoreTest < ActionDispatch::IntegrationTest def test_does_set_secure_cookies_over_https with_test_route_set(:secure => true) do - get '/set_session_value', nil, 'HTTPS' => 'on' + get '/set_session_value', headers: { 'HTTPS' => 'on' } assert_response :success assert_equal "_myapp_session=#{response.body}; path=/; secure; HttpOnly", headers['Set-Cookie'] @@ -247,7 +247,7 @@ class CookieStoreTest < ActionDispatch::IntegrationTest cookies[SessionKey] = SignedBar get '/persistent_session_id' assert_response :success - assert_equal response.body.size, 32 + assert_equal 32, response.body.size session_id = response.body get '/persistent_session_id' assert_equal session_id, response.body @@ -263,7 +263,7 @@ class CookieStoreTest < ActionDispatch::IntegrationTest get "/get_session_id" sid = response.body - assert_equal sid.size, 36 + assert_equal 36, sid.size get "/change_session_id" assert_not_equal sid, response.body @@ -331,9 +331,11 @@ class CookieStoreTest < ActionDispatch::IntegrationTest private # Overwrite get to send SessionSecret in env hash - def get(path, parameters = nil, env = {}) - env["action_dispatch.key_generator"] ||= Generator - super + def get(path, *args) + args[0] ||= {} + args[0][:headers] ||= {} + args[0][:headers]["action_dispatch.key_generator"] ||= Generator + super(path, *args) end def with_test_route_set(options = {}) |