aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-12-31 03:51:43 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-12-31 03:51:43 +0000
commit89d8afa2c4f256ffb84b6c9e521546b5dd3e60d8 (patch)
tree94891dfc441d91381d1e4aef944c7936ffcf079e /actionpack/test
parent341d34cd50ab1d807a9d515058d1da8fe75deb01 (diff)
downloadrails-89d8afa2c4f256ffb84b6c9e521546b5dd3e60d8.tar.gz
rails-89d8afa2c4f256ffb84b6c9e521546b5dd3e60d8.tar.bz2
rails-89d8afa2c4f256ffb84b6c9e521546b5dd3e60d8.zip
Added that JavaScriptHelper#link_to_function will honor existing :onclick definitions when adding the function call [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3365 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/template/javascript_helper_test.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/test/template/javascript_helper_test.rb b/actionpack/test/template/javascript_helper_test.rb
index 6a01bd14b2..ef830e4e98 100644
--- a/actionpack/test/template/javascript_helper_test.rb
+++ b/actionpack/test/template/javascript_helper_test.rb
@@ -27,7 +27,7 @@ class JavaScriptHelperTest < Test::Unit::TestCase
end
def test_link_to_function_with_existing_onclick
- assert_dom_equal %(<a href="#" onclick="alert('Hello world!'); confirm('Sanity!'); return false;">Greeting</a>),
+ assert_dom_equal %(<a href="#" onclick="confirm('Sanity!'); alert('Hello world!'); return false;">Greeting</a>),
link_to_function("Greeting", "alert('Hello world!')", :onclick => "confirm('Sanity!')")
end
end