aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/javascript_helper_test.rb
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2007-06-08 04:00:15 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2007-06-08 04:00:15 +0000
commit34b94de8b87d7c32a1fdba72eb1f02296f31cffe (patch)
tree8a37aa95d8e8aadc42cdda5405832309fa1789cd /actionpack/test/template/javascript_helper_test.rb
parent9b444fe73beaddccd5664d0e0f17f948f00680bf (diff)
downloadrails-34b94de8b87d7c32a1fdba72eb1f02296f31cffe.tar.gz
rails-34b94de8b87d7c32a1fdba72eb1f02296f31cffe.tar.bz2
rails-34b94de8b87d7c32a1fdba72eb1f02296f31cffe.zip
Improve Action View test coverage. Closes #7241, #7243, #7244.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6967 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test/template/javascript_helper_test.rb')
-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 7ffc381df5..da574624ec 100644
--- a/actionpack/test/template/javascript_helper_test.rb
+++ b/actionpack/test/template/javascript_helper_test.rb
@@ -46,6 +46,11 @@ class JavaScriptHelperTest < Test::Unit::TestCase
assert_dom_equal %(<a href="#" class="updater" onclick="Element.update(&quot;header&quot;, &quot;\\074h1\\076Greetings\\074/h1\\076&quot;);; return false;">Greet me!</a>), html
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!')")