Skip to content

Commit

Permalink
Add regression test for #1021
Browse files Browse the repository at this point in the history
  • Loading branch information
Zachary Scott committed May 9, 2016
1 parent 1ae202f commit bb40ef6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/templates_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,13 @@ def with_default_layout
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'
Expand Down

0 comments on commit bb40ef6

Please sign in to comment.