1
0
Fork 0
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:
yui-knk 2017-07-13 01:34:57 +09:00
parent 58f10a31b3
commit 752e8172b6

View file

@ -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