diff options
author | Jonas Baumann <jone@jone.ch> | 2015-01-09 16:55:02 +0100 |
---|---|---|
committer | Jonas Baumann <jone@jone.ch> | 2015-01-09 16:55:02 +0100 |
commit | 0739480f458f90d79dbf9d14a8340c6b913f9c51 (patch) | |
tree | fd4be7ca13e1de80cd3265ec0b1c4ea2115f173f /actionpack/lib | |
parent | 6f9eab9ebe03cdb3bd0aa9a6e2b3ece0ed354311 (diff) | |
download | rails-0739480f458f90d79dbf9d14a8340c6b913f9c51.tar.gz rails-0739480f458f90d79dbf9d14a8340c6b913f9c51.tar.bz2 rails-0739480f458f90d79dbf9d14a8340c6b913f9c51.zip |
Default headers, removed in controller actions, will not be reapplied to the test response.
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_dispatch/testing/test_response.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/actionpack/lib/action_dispatch/testing/test_response.rb b/actionpack/lib/action_dispatch/testing/test_response.rb index 82039e72e7..369ea1467c 100644 --- a/actionpack/lib/action_dispatch/testing/test_response.rb +++ b/actionpack/lib/action_dispatch/testing/test_response.rb @@ -25,5 +25,12 @@ module ActionDispatch # Was there a server-side error? alias_method :error?, :server_error? + + def merge_default_headers(original, *args) + # Default headers are already applied, no need to merge them a second time. + # This makes sure that default headers, removed in controller actions, will + # not be reapplied to the test response. + original + end end end |