From bb40ef64460e7642bba264479284da4775420154 Mon Sep 17 00:00:00 2001 From: Zachary Scott Date: Mon, 9 May 2016 14:38:55 +0900 Subject: [PATCH] Add regression test for #1021 --- test/templates_test.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/templates_test.rb b/test/templates_test.rb index a9097ba4e9..63adc1eb7c 100644 --- a/test/templates_test.rb +++ b/test/templates_test.rb @@ -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'