From aa054c35f7809b57ecb105e485e4436d9fe37b1b Mon Sep 17 00:00:00 2001 From: Rodrigo Dominguez Date: Tue, 27 Jul 2010 15:38:20 -0300 Subject: link_to_function now expects a piece of javascript code for the onclick parameter [#5179] Signed-off-by: Santiago Pastorino --- actionpack/test/template/javascript_helper_test.rb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/actionpack/test/template/javascript_helper_test.rb b/actionpack/test/template/javascript_helper_test.rb index 1a899c6aee..a8ca19931b 100644 --- a/actionpack/test/template/javascript_helper_test.rb +++ b/actionpack/test/template/javascript_helper_test.rb @@ -90,11 +90,12 @@ class JavaScriptHelperTest < ActionView::TestCase end def test_link_to_function_with_inner_block_does_not_raise_exception - html = link_to_function("Greet me!") do |page| - content_tag(:h1) { 'Hi' } + html = link_to_function( "Greet me!" ) do |page| + page.replace_html 'header', (content_tag :h1 do + 'Greetings' + end) end - - assert_dom_equal %(Greet me!), html + assert_dom_equal %(Greet me!), html end def test_javascript_tag -- cgit v1.2.3