aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/render_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/controller/render_test.rb')
-rw-r--r--actionpack/test/controller/render_test.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/actionpack/test/controller/render_test.rb b/actionpack/test/controller/render_test.rb
index 510d1a8765..8b4149dcb4 100644
--- a/actionpack/test/controller/render_test.rb
+++ b/actionpack/test/controller/render_test.rb
@@ -142,6 +142,16 @@ class TestController < ActionController::Base
end
end
+ def respond_to_partial_as_rjs
+ respond_to do |format|
+ format.js do
+ render :update do |page|
+ page.replace :foo, :partial => 'partial'
+ end
+ end
+ end
+ end
+
def rescue_action(e) raise end
private
@@ -388,6 +398,11 @@ class RenderTest < Test::Unit::TestCase
assert_equal %(Element.replace("foo", "partial html");), @response.body
end
+ def test_should_render_html_formatted_partial_with_rjs_and_js_format
+ xhr :get, :respond_to_partial_as_rjs
+ assert_equal %(Element.replace("foo", "partial html");), @response.body
+ end
+
def test_should_render_js_partial
xhr :get, :partial, :format => 'js'
assert_equal 'partial js', @response.body