Permalink
Browse files

Improve tests (closes #7240) [josh]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7581 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent ee45d76 commit f0dc2774e80496bbc46f5b44e76deaa575131a42 @dhh dhh committed Sep 22, 2007
Showing with 5 additions and 0 deletions.
  1. +5 −0 actionpack/test/template/javascript_helper_test.rb
@@ -53,6 +53,11 @@ 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_href
+ assert_dom_equal %(<a href="http://example.com/" onclick="alert('Hello world!'); return false;">Greeting</a>),
+ link_to_function("Greeting", "alert('Hello world!')", :href => 'http://example.com/')
+ end
+
def test_button_to_function
assert_dom_equal %(<input type="button" onclick="alert('Hello world!');" value="Greeting" />),
button_to_function("Greeting", "alert('Hello world!')")

0 comments on commit f0dc277

Please sign in to comment.