From ad242320db121bf8a6f439aa66deeedb34b1b5a5 Mon Sep 17 00:00:00 2001 From: Rodrigo Dominguez Date: Sat, 24 Jul 2010 19:35:14 -0300 Subject: [PATCH] Test case for inner block inside link_to_function --- actionpack/test/template/javascript_helper_test.rb | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/actionpack/test/template/javascript_helper_test.rb b/actionpack/test/template/javascript_helper_test.rb index c5c2a6b..a2cfced 100644 --- a/actionpack/test/template/javascript_helper_test.rb +++ b/actionpack/test/template/javascript_helper_test.rb @@ -88,6 +88,14 @@ class JavaScriptHelperTest < ActionView::TestCase assert_dom_equal %(Greeting), link_to_function("Greeting", "alert('Hello world!')", :href => 'http://example.com/') end + + def test_link_to_function_with_inner_block + html = link_to_function("Greet me!") do |page| + content_tag :h1 do + 'Hi' + end + end + end def test_javascript_tag self.output_buffer = 'foo' -- 1.6.4.4