From 06dd1f2ca3398b978bb286688aa68acacd7dd712 Mon Sep 17 00:00:00 2001 From: Sam Stephenson Date: Fri, 20 Jan 2006 22:04:07 +0000 Subject: Add render :update for inline RJS git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3441 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/test/controller/new_render_test.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'actionpack/test/controller/new_render_test.rb') 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 "Putting stuff in the title!\n\nGreat stuff!\n", @response.body -- cgit v1.2.3