From 1b8ced53c4031170538c455c3d3fae3c967cc247 Mon Sep 17 00:00:00 2001 From: Stefan Penner Date: Tue, 26 Jan 2010 14:08:10 -0600 Subject: Added regression tests that discovered the previous issue. --- actionpack/test/template/ajax_helper_test.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'actionpack/test/template') diff --git a/actionpack/test/template/ajax_helper_test.rb b/actionpack/test/template/ajax_helper_test.rb index 4e48543c81..ed020d74f8 100644 --- a/actionpack/test/template/ajax_helper_test.rb +++ b/actionpack/test/template/ajax_helper_test.rb @@ -86,6 +86,20 @@ class AjaxHelperTest < AjaxHelperBaseTest link_to_remote("Remote outauthor", :url => { :action => "whatnot" }, :position => :bottom) end + test "link_to_remote using both url and href" do + expected = 'Delete this Post' + assert_dom_equal expected, link_to_remote( "Delete this Post", + { :update => "posts", + :url => { :action => "destroy" } }, + :href => url_for(:action => "destroy")) + end + + test "link_to_remote with update-success and url" do + expected = 'Delete this Post' + assert_dom_equal expected, link_to_remote( "Delete this Post", :url => { :action => "destroy", :id => 5 }, + :update => { :success => "posts", :failure => "error" }) + end + test "link_to_remote with before/after callbacks" do assert_dom_equal %(Remote outauthor), link_to_remote("Remote outauthor", :url => { :action => "whatnot" }, :before => "before();", :after => "after();") -- cgit v1.2.3