From 574355c51830f4e33402e7ee70cbc189051e816f Mon Sep 17 00:00:00 2001 From: Carlos Antonio da Silva Date: Sun, 25 Jul 2010 17:29:17 -0300 Subject: [PATCH] Add assertion to link_to_function test with block and capture, and more expressive test name --- actionpack/test/template/javascript_helper_test.rb | 9 ++++----- 1 files changed, 4 insertions(+), 5 deletions(-) diff --git a/actionpack/test/template/javascript_helper_test.rb b/actionpack/test/template/javascript_helper_test.rb index eccb706..1a899c6 100644 --- a/actionpack/test/template/javascript_helper_test.rb +++ b/actionpack/test/template/javascript_helper_test.rb @@ -89,14 +89,13 @@ class JavaScriptHelperTest < ActionView::TestCase link_to_function("Greeting", "alert('Hello world!')", :href => 'http://example.com/') end - def test_link_to_function_with_inner_block + def test_link_to_function_with_inner_block_does_not_raise_exception html = link_to_function("Greet me!") do |page| - content_tag :h1 do - 'Hi' - end + content_tag(:h1) { 'Hi' } end - end + assert_dom_equal %(Greet me!), html + end def test_javascript_tag self.output_buffer = 'foo' -- 1.7.2