aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r--actionpack/test/controller/new_render_test.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/actionpack/test/controller/new_render_test.rb b/actionpack/test/controller/new_render_test.rb
index 38d4cdb648..580717a655 100644
--- a/actionpack/test/controller/new_render_test.rb
+++ b/actionpack/test/controller/new_render_test.rb
@@ -188,6 +188,13 @@ class NewRenderTestController < ActionController::Base
render :action => 'delete_with_js'
end
+ def update_page
+ render :update do |page|
+ page.replace_html 'balance', '$37,000,000.00'
+ page.visual_effect :highlight, 'balance'
+ end
+ end
+
def action_talk_to_layout
# Action template sets variable that's picked up by layout
end
@@ -480,6 +487,12 @@ class NewRenderTest < Test::Unit::TestCase
assert_equal "world", assigns["hello"]
end
+ def test_update_page
+ get :update_page
+ assert_equal 'text/javascript', @response.headers['Content-type']
+ assert_equal 2, @response.body.split($/).length
+ end
+
def test_yield_content_for
get :yield_content_for
assert_equal "<title>Putting stuff in the title!</title>\n\nGreat stuff!\n", @response.body