mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Remove needless restoring of default_charset
`default_charset` is not changed in this test case, so we do not need to backup an original value and restore it.
This commit is contained in:
parent
58f10a31b3
commit
752e8172b6
1 changed files with 2 additions and 7 deletions
|
@ -294,13 +294,8 @@ class ResponseTest < ActiveSupport::TestCase
|
|||
end
|
||||
|
||||
test "read content type with default charset utf-8" do
|
||||
original = ActionDispatch::Response.default_charset
|
||||
begin
|
||||
resp = ActionDispatch::Response.new(200, "Content-Type" => "text/xml")
|
||||
assert_equal("utf-8", resp.charset)
|
||||
ensure
|
||||
ActionDispatch::Response.default_charset = original
|
||||
end
|
||||
resp = ActionDispatch::Response.new(200, "Content-Type" => "text/xml")
|
||||
assert_equal("utf-8", resp.charset)
|
||||
end
|
||||
|
||||
test "read content type with charset utf-16" do
|
||||
|
|
Loading…
Reference in a new issue