aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2007-09-22 23:11:45 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2007-09-22 23:11:45 +0000
commitf0dc2774e80496bbc46f5b44e76deaa575131a42 (patch)
treecf5524e10e44f4464f25223e3bccb34ce77a6389 /actionpack
parentee45d76df80a86961dd44f8526b0ac97bc98ce60 (diff)
downloadrails-f0dc2774e80496bbc46f5b44e76deaa575131a42.tar.gz
rails-f0dc2774e80496bbc46f5b44e76deaa575131a42.tar.bz2
rails-f0dc2774e80496bbc46f5b44e76deaa575131a42.zip
Improve tests (closes #7240) [josh]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7581 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/test/template/javascript_helper_test.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/actionpack/test/template/javascript_helper_test.rb b/actionpack/test/template/javascript_helper_test.rb
index 76a46e8504..eb4bedd1ed 100644
--- a/actionpack/test/template/javascript_helper_test.rb
+++ b/actionpack/test/template/javascript_helper_test.rb
@@ -53,6 +53,11 @@ class JavaScriptHelperTest < Test::Unit::TestCase
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!')")