aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
authorSam Stephenson <sam@37signals.com>2006-01-20 22:04:07 +0000
committerSam Stephenson <sam@37signals.com>2006-01-20 22:04:07 +0000
commit06dd1f2ca3398b978bb286688aa68acacd7dd712 (patch)
tree7b924286338cb81f252b448ec3851238fab9573e /actionpack/test
parentf9c13e6134bbc32dd826eec39fedba5de2514f88 (diff)
downloadrails-06dd1f2ca3398b978bb286688aa68acacd7dd712.tar.gz
rails-06dd1f2ca3398b978bb286688aa68acacd7dd712.tar.bz2
rails-06dd1f2ca3398b978bb286688aa68acacd7dd712.zip
Add render :update for inline RJS
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3441 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test')
-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