diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2010-06-06 12:07:40 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2010-06-06 12:07:40 -0700 |
commit | 9f93de9d3dd7db8de67cb0ee10ea03cdba9b6e5c (patch) | |
tree | 6d8bed7c69a4e061b21c6e5e58c8f170652b0b53 /actionpack/lib/action_controller/test_case.rb | |
parent | 509f3d7d2f346b83dfd22aec681feffbd2d25803 (diff) | |
download | rails-9f93de9d3dd7db8de67cb0ee10ea03cdba9b6e5c.tar.gz rails-9f93de9d3dd7db8de67cb0ee10ea03cdba9b6e5c.tar.bz2 rails-9f93de9d3dd7db8de67cb0ee10ea03cdba9b6e5c.zip |
Reset request.parameters after assigning params for functional tests
Diffstat (limited to 'actionpack/lib/action_controller/test_case.rb')
-rw-r--r-- | actionpack/lib/action_controller/test_case.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/actionpack/lib/action_controller/test_case.rb b/actionpack/lib/action_controller/test_case.rb index 37906b79f6..21281b606e 100644 --- a/actionpack/lib/action_controller/test_case.rb +++ b/actionpack/lib/action_controller/test_case.rb @@ -139,14 +139,16 @@ module ActionController end end - params = self.request_parameters.dup + # Clear the combined params hash in case it was already referenced. + @env.delete("action_dispatch.request.parameters") + params = self.request_parameters.dup %w(controller action only_path).each do |k| params.delete(k) params.delete(k.to_sym) end - data = params.to_query + @env['CONTENT_LENGTH'] = data.length.to_s @env['rack.input'] = StringIO.new(data) end |