aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch/response_test.rb
diff options
context:
space:
mode:
authorPrem Sichanugrist <s@sikac.hu>2014-02-28 19:39:22 -0500
committerPrem Sichanugrist <s@sikac.hu>2014-03-05 10:33:52 -0500
commited88a601f7b37de0f89b64249aaeed884faed836 (patch)
treeb1414652556db81876b51138070ba25bd088f07b /actionpack/test/dispatch/response_test.rb
parent058d3c6183ef6e0e878bea37f4fe3f8f0d6758e2 (diff)
downloadrails-ed88a601f7b37de0f89b64249aaeed884faed836.tar.gz
rails-ed88a601f7b37de0f89b64249aaeed884faed836.tar.bz2
rails-ed88a601f7b37de0f89b64249aaeed884faed836.zip
Do note remove `Content-Type` when `render :body`
`render :body` should just not set the `Content-Type` header. By removing the header, it breaks the compatibility with other parts. After this commit, `render :body` will returns `text/html` content type, sets by default from `ActionDispatch::Response`, and it will preserve the overridden content type if you override it. Fixes #14197, #14238 This partially reverts commit 3047376870d4a7adc7ff15c3cb4852e073c8f1da.
Diffstat (limited to 'actionpack/test/dispatch/response_test.rb')
-rw-r--r--actionpack/test/dispatch/response_test.rb8
1 files changed, 0 insertions, 8 deletions
diff --git a/actionpack/test/dispatch/response_test.rb b/actionpack/test/dispatch/response_test.rb
index 1360ede3f8..959a3bc5cd 100644
--- a/actionpack/test/dispatch/response_test.rb
+++ b/actionpack/test/dispatch/response_test.rb
@@ -235,14 +235,6 @@ 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.no_content_type = true
- }
-
- assert_not resp.headers.has_key?('Content-Type')
- end
end
class ResponseIntegrationTest < ActionDispatch::IntegrationTest