aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/testing
diff options
context:
space:
mode:
authorAndrew White <andyw@pixeltrix.co.uk>2013-03-15 02:16:52 -0700
committerAndrew White <andyw@pixeltrix.co.uk>2013-03-15 02:16:52 -0700
commitddb9040b433b00aa0206442aa718eee12bceb517 (patch)
treec87f2a7a1643772a81161b2d4ea53474df07130d /actionpack/lib/action_dispatch/testing
parentc1003d99b00b3afb5417b6853a3e2ba92638cbe8 (diff)
parente8598a53a17da5fa909e6e5ec1d8284fca6a85f9 (diff)
downloadrails-ddb9040b433b00aa0206442aa718eee12bceb517.tar.gz
rails-ddb9040b433b00aa0206442aa718eee12bceb517.tar.bz2
rails-ddb9040b433b00aa0206442aa718eee12bceb517.zip
Merge pull request #9716 from senny/rework_headers_functional_tests
Rework headers functional tests
Diffstat (limited to 'actionpack/lib/action_dispatch/testing')
-rw-r--r--actionpack/lib/action_dispatch/testing/integration.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/actionpack/lib/action_dispatch/testing/integration.rb b/actionpack/lib/action_dispatch/testing/integration.rb
index ae1b0b5dea..56c31255f3 100644
--- a/actionpack/lib/action_dispatch/testing/integration.rb
+++ b/actionpack/lib/action_dispatch/testing/integration.rb
@@ -269,7 +269,6 @@ module ActionDispatch
# Performs the actual request.
def process(method, path, parameters = nil, headers_or_env = nil)
- rack_env = Http::Headers.new(headers_or_env || {}).env
if path =~ %r{://}
location = URI.parse(path)
https! URI::HTTPS === location if location.scheme
@@ -300,10 +299,12 @@ module ActionDispatch
"CONTENT_TYPE" => "application/x-www-form-urlencoded",
"HTTP_ACCEPT" => accept
}
+ # this modifies the passed env directly
+ Http::Headers.new(env).merge!(headers_or_env || {})
session = Rack::Test::Session.new(_mock_session)
- env.merge!(rack_env)
+ env.merge!(env)
# NOTE: rack-test v0.5 doesn't build a default uri correctly
# Make sure requested path is always a full uri