Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add assertion to link_to_function test with block and capture, and mo…

…re expressive test name [#5179 state:resolved]

Signed-off-by: José Valim <jose.valim@gmail.com>
  • Loading branch information...
commit 751f89b8b28634cb237d1e47f33ddefaa13829dc 1 parent 92669b8
@carlosantoniodasilva carlosantoniodasilva authored josevalim committed
Showing with 4 additions and 5 deletions.
  1. +4 −5 actionpack/test/template/javascript_helper_test.rb
View
9 actionpack/test/template/javascript_helper_test.rb
@@ -89,14 +89,13 @@ def test_link_to_function_with_href
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'
Please sign in to comment.
Something went wrong with that request. Please try again.