aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/action_pack_assertions_test.rb
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2006-06-02 03:39:56 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2006-06-02 03:39:56 +0000
commit5c30352328f8a0223746139e024b6bea7b3d36c0 (patch)
tree02be13f488a586b6c88fb85da06f6ed44ada32e9 /actionpack/test/controller/action_pack_assertions_test.rb
parentace2a66f0cdda4b752b6226eadf07873c402e380 (diff)
downloadrails-5c30352328f8a0223746139e024b6bea7b3d36c0.tar.gz
rails-5c30352328f8a0223746139e024b6bea7b3d36c0.tar.bz2
rails-5c30352328f8a0223746139e024b6bea7b3d36c0.zip
Added support for Mime objects in render :content_type option [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4404 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
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