aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/javascript_helper_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/template/javascript_helper_test.rb')
-rw-r--r--actionpack/test/template/javascript_helper_test.rb8
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 c5c2a6b952..1a899c6aee 100644
--- a/actionpack/test/template/javascript_helper_test.rb
+++ b/actionpack/test/template/javascript_helper_test.rb
@@ -89,6 +89,14 @@ class JavaScriptHelperTest < ActionView::TestCase
link_to_function("Greeting", "alert('Hello world!')", :href => 'http://example.com/')
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' }
+ end
+
+ assert_dom_equal %(<a href='#' onclick="; return false;">Greet me!</a>), html
+ end
+
def test_javascript_tag
self.output_buffer = 'foo'