aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2015-07-08 16:27:02 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2015-07-08 16:27:02 -0700
commit9f09848918e5f499e9d07a734345ee106d0fb9f9 (patch)
treeec3377201a186d8e65fcfa15b44f2d5118d01f91 /actionpack/lib/action_controller
parentf65fd25f0491919ef9db6e79be43f5d6f518374a (diff)
downloadrails-9f09848918e5f499e9d07a734345ee106d0fb9f9.tar.gz
rails-9f09848918e5f499e9d07a734345ee106d0fb9f9.tar.bz2
rails-9f09848918e5f499e9d07a734345ee106d0fb9f9.zip
assign the cookie hash on request allocation
this prevents mutations from being available globally
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r--actionpack/lib/action_controller/test_case.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/test_case.rb b/actionpack/lib/action_controller/test_case.rb
index 6095f1b95e..788fc9fe7d 100644
--- a/actionpack/lib/action_controller/test_case.rb
+++ b/actionpack/lib/action_controller/test_case.rb
@@ -18,6 +18,7 @@ module ActionController
def self.create
env = {}
env = Rails.application.env_config.merge(env) if defined?(Rails.application) && Rails.application
+ env["rack.request.cookie_hash"] = {}.with_indifferent_access
new(default_env.merge(env), new_session)
end
@@ -514,7 +515,6 @@ module ActionController
end
@request = TestRequest.create
- @request.env["rack.request.cookie_hash"] = {}.with_indifferent_access
@response = build_response @response_klass
@response.request = @request