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>
This commit is contained in:
Carlos Antonio da Silva
2010-07-25 17:29:17 -03:00
committed by José Valim
parent 92669b8320
commit 751f89b8b2

View File

@@ -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'