aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch/response_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/dispatch/response_test.rb')
-rw-r--r--actionpack/test/dispatch/response_test.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/response_test.rb b/actionpack/test/dispatch/response_test.rb
index 959a3bc5cd..26b77dfaf7 100644
--- a/actionpack/test/dispatch/response_test.rb
+++ b/actionpack/test/dispatch/response_test.rb
@@ -235,6 +235,14 @@ class ResponseTest < ActiveSupport::TestCase
assert_equal @response.body, body.each.to_a.join
end
end
+
+ test "does not add default content-type if Content-Type is none" do
+ resp = ActionDispatch::Response.new.tap { |response|
+ response.content_type = 'none'
+ }
+
+ assert_not resp.headers.has_key?('Content-Type')
+ end
end
class ResponseIntegrationTest < ActionDispatch::IntegrationTest