Add regression test for #1021

This commit is contained in:
Zachary Scott 2016-05-09 14:38:55 +09:00
parent 1ae202f27c
commit bb40ef6446
1 changed files with 7 additions and 0 deletions

View File

@ -279,6 +279,13 @@ class TemplatesTest < Minitest::Test
assert_equal 'bar', body
end
it 'allows setting default content type' do
render_app(:str => { :default_content_type => :txt }) {
render :str, 'foo'
}
assert_equal 'text/plain;charset=utf-8', response['Content-Type']
end
it 'allows setting default content type per template engine' do
render_app(:str => { :content_type => :txt }) {
render :str, 'foo'