diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2015-07-08 16:27:02 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2015-07-08 16:27:02 -0700 |
commit | 9f09848918e5f499e9d07a734345ee106d0fb9f9 (patch) | |
tree | ec3377201a186d8e65fcfa15b44f2d5118d01f91 /actionpack/lib/action_dispatch/testing | |
parent | f65fd25f0491919ef9db6e79be43f5d6f518374a (diff) | |
download | rails-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_dispatch/testing')
-rw-r--r-- | actionpack/lib/action_dispatch/testing/test_request.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/testing/test_request.rb b/actionpack/lib/action_dispatch/testing/test_request.rb index b9d11cb530..ad1a7f7109 100644 --- a/actionpack/lib/action_dispatch/testing/test_request.rb +++ b/actionpack/lib/action_dispatch/testing/test_request.rb @@ -7,12 +7,12 @@ module ActionDispatch 'HTTP_HOST' => 'test.host', 'REMOTE_ADDR' => '0.0.0.0', 'HTTP_USER_AGENT' => 'Rails Testing', - "rack.request.cookie_hash" => {}.with_indifferent_access ) # Create a new test request with default `env` values 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)) end |