aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/action_pack_assertions_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/controller/action_pack_assertions_test.rb')
-rw-r--r--actionpack/test/controller/action_pack_assertions_test.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/actionpack/test/controller/action_pack_assertions_test.rb b/actionpack/test/controller/action_pack_assertions_test.rb
index bd9c8c1ff8..0ef31cb851 100644
--- a/actionpack/test/controller/action_pack_assertions_test.rb
+++ b/actionpack/test/controller/action_pack_assertions_test.rb
@@ -61,6 +61,10 @@ class ActionPackAssertionsController < ActionController::Base
render_text "<div>#{url_for(:action => 'flash_me', :only_path => true)}</div>"
end
+ def render_text_with_custom_content_type
+ render :text => "Hello!", :content_type => Mime::RSS
+ end
+
# puts something in the session
def session_stuffing
session['xmas'] = 'turkey'
@@ -532,4 +536,10 @@ class ActionPackHeaderTest < Test::Unit::TestCase
process :hello_xml_world
assert_equal('application/pdf', @controller.headers['Content-Type'])
end
+
+
+ def test_render_text_with_custom_content_type
+ get :render_text_with_custom_content_type
+ assert_equal 'application/rss+xml', @response.headers['Content-Type']
+ end
end