From f60f76eab021c9dcfe3b67de3fd41288061f3065 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20L=C3=BCtke?= Date: Thu, 13 Oct 2005 17:39:14 +0000 Subject: modified javascript_helper testcase to back up #2097 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2550 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/test/template/javascript_helper_test.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/actionpack/test/template/javascript_helper_test.rb b/actionpack/test/template/javascript_helper_test.rb index 5967d29fc1..30528e1cc9 100644 --- a/actionpack/test/template/javascript_helper_test.rb +++ b/actionpack/test/template/javascript_helper_test.rb @@ -31,7 +31,7 @@ class JavaScriptHelperTest < Test::Unit::TestCase def test_escape_javascript assert_equal %(This \\"thing\\" is really\\n netos\\'), escape_javascript(%(This "thing" is really\n netos')) end - + def test_link_to_function assert_dom_equal %(Greeting), link_to_function("Greeting", "alert('Hello world!')") @@ -41,7 +41,11 @@ class JavaScriptHelperTest < Test::Unit::TestCase assert_dom_equal %(Remote outpost), link_to_remote("Remote outpost", { :url => { :action => "whatnot" }}, { :class => "fine" }) assert_dom_equal %(Remote outpost), - link_to_remote("Remote outpost", :complete => "alert(request.reponseText)", :url => { :action => "whatnot" }) + link_to_remote("Remote outpost", :complete => "alert(request.reponseText)", :url => { :action => "whatnot" }) + assert_dom_equal %(Remote outpost), + link_to_remote("Remote outpost", :success => "alert(request.reponseText)", :url => { :action => "whatnot" }) + assert_dom_equal %(Remote outpost), + link_to_remote("Remote outpost", :failure => "alert(request.reponseText)", :url => { :action => "whatnot" }) end def test_periodically_call_remote -- cgit v1.2.3