diff options
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r-- | actionpack/test/controller/render_test.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/actionpack/test/controller/render_test.rb b/actionpack/test/controller/render_test.rb index d51af51454..968559fcc2 100644 --- a/actionpack/test/controller/render_test.rb +++ b/actionpack/test/controller/render_test.rb @@ -132,6 +132,16 @@ class TestController < ActionController::Base @foo = render_to_string :inline => "this is a test" end + def partial + render :partial => 'partial' + end + + def partial_as_rjs + render :update do |page| + page.replace :foo, :partial => 'partial' + end + end + def rescue_action(e) raise end private @@ -368,6 +378,15 @@ class RenderTest < Test::Unit::TestCase assert_equal '<test>passed formatted html erb</test>', @response.body end + def test_should_render_html_formatted_partial + get :partial + assert_equal 'partial html', @response.body + end + + def test_should_render_html_formatted_partial_with_rjs + xhr :get, :partial_as_rjs + assert_equal %(Element.replace("foo", "partial html");), @response.body + end protected def assert_deprecated_render(&block) |