diff options
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/test/controller/content_type_test.rb | 9 | ||||
-rw-r--r-- | actionpack/test/fixtures/content_type/render_default_for_rjs.rjs | 1 |
2 files changed, 10 insertions, 0 deletions
diff --git a/actionpack/test/controller/content_type_test.rb b/actionpack/test/controller/content_type_test.rb index f2708acc0a..6f0618da0e 100644 --- a/actionpack/test/controller/content_type_test.rb +++ b/actionpack/test/controller/content_type_test.rb @@ -25,6 +25,9 @@ class ContentTypeController < ActionController::Base def render_default_for_rxml end + def render_default_for_rjs + end + def render_change_for_rxml response.content_type = Mime::HTML render :action => "render_default_for_rxml" @@ -100,6 +103,12 @@ class ContentTypeTest < Test::Unit::TestCase assert_equal "utf-8", @response.charset end + def test_default_for_rjs + xhr :post, :render_default_for_rjs + assert_equal Mime::JS, @response.content_type + assert_equal "utf-8", @response.charset + end + def test_change_for_rxml get :render_change_for_rxml assert_equal Mime::HTML, @response.content_type diff --git a/actionpack/test/fixtures/content_type/render_default_for_rjs.rjs b/actionpack/test/fixtures/content_type/render_default_for_rjs.rjs new file mode 100644 index 0000000000..8d614d04ad --- /dev/null +++ b/actionpack/test/fixtures/content_type/render_default_for_rjs.rjs @@ -0,0 +1 @@ +page.alert 'hello world!'
\ No newline at end of file |