diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2010-07-25 17:29:17 -0300 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-07-25 23:00:15 +0200 |
commit | 751f89b8b28634cb237d1e47f33ddefaa13829dc (patch) | |
tree | 9125c78755d5820a18ecc7f1320fcef09d7ff65e /actionpack/test/template | |
parent | 92669b8320a45e3f0497bfb83c0c8e55d515be0c (diff) | |
download | rails-751f89b8b28634cb237d1e47f33ddefaa13829dc.tar.gz rails-751f89b8b28634cb237d1e47f33ddefaa13829dc.tar.bz2 rails-751f89b8b28634cb237d1e47f33ddefaa13829dc.zip |
Add assertion to link_to_function test with block and capture, and more expressive test name [#5179 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'actionpack/test/template')
-rw-r--r-- | 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 eccb706501..1a899c6aee 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 %(<a href='#' onclick="; return false;">Greet me!</a>), html + end def test_javascript_tag self.output_buffer = 'foo' |