From 0739480f458f90d79dbf9d14a8340c6b913f9c51 Mon Sep 17 00:00:00 2001 From: Jonas Baumann <jone@jone.ch> Date: Fri, 9 Jan 2015 16:55:02 +0100 Subject: Default headers, removed in controller actions, will not be reapplied to the test response. --- actionpack/lib/action_dispatch/testing/test_response.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'actionpack/lib') 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 -- cgit v1.2.3