aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
authorKir Shatrov <shatrov@me.com>2016-09-09 22:17:10 -0400
committerKir Shatrov <shatrov@me.com>2016-09-10 11:13:12 -0400
commit040ca9cf5b7e193f0fb15166135643daa60f9237 (patch)
treeac4c24aeade3a3ece8b88bdc37c083f7f7cc1dab /actionpack/test
parentcf5f55cd30aef0f90300c7c8f333060fe258cd8a (diff)
downloadrails-040ca9cf5b7e193f0fb15166135643daa60f9237.tar.gz
rails-040ca9cf5b7e193f0fb15166135643daa60f9237.tar.bz2
rails-040ca9cf5b7e193f0fb15166135643daa60f9237.zip
Do not mutate AC::TestRequest::DEFAULT_OPTIONS
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/controller/request/test_request_test.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/actionpack/test/controller/request/test_request_test.rb b/actionpack/test/controller/request/test_request_test.rb
index 6e0ca957c3..fa049fbc9f 100644
--- a/actionpack/test/controller/request/test_request_test.rb
+++ b/actionpack/test/controller/request/test_request_test.rb
@@ -6,6 +6,11 @@ class ActionController::TestRequestTest < ActionController::TestCase
assert @request.session_options
end
+ def test_mutating_session_options_does_not_affect_default_options
+ @request.session_options[:myparam] = 123
+ assert_equal nil, ActionController::TestSession::DEFAULT_OPTIONS[:myparam]
+ end
+
ActionDispatch::Session::AbstractStore::DEFAULT_OPTIONS.each_key do |option|
test "rack default session options #{option} exists in session options and is default" do
assert_equal(ActionDispatch::Session::AbstractStore::DEFAULT_OPTIONS[option],