From a5e9d033e81152e1b2280042ba6289c8a231e8bf Mon Sep 17 00:00:00 2001 From: "Stephen St. Martin" Date: Sun, 24 Jan 2010 13:21:35 -0500 Subject: add missing test for :with option to link_to_remote --- actionpack/test/template/ajax_helper_test.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/actionpack/test/template/ajax_helper_test.rb b/actionpack/test/template/ajax_helper_test.rb index 4d76007d52..6fa8a95d42 100644 --- a/actionpack/test/template/ajax_helper_test.rb +++ b/actionpack/test/template/ajax_helper_test.rb @@ -90,6 +90,12 @@ class AjaxHelperTest < AjaxHelperBaseTest assert_dom_equal %(Remote outauthor), link_to_remote("Remote outauthor", :url => { :action => "whatnot" }, :before => "before();", :after => "after();") end + + test "link_to_remote using :with expression" do + expected = %(Remote outauthor) + assert_dom_equal expected, link_to_remote("Remote outauthor", :url => { :action => "whatnot" }, :with => "id") + assert_dom_equal expected, link_to_remote("Remote outauthor", :url => { :action => "whatnot" }, :with => "'id=' + encodeURIComponent(value)") + end test "link_to_remote with method delete" do assert_dom_equal %(Remote outauthor), -- cgit v1.2.3