diff options
author | Stephen St. Martin <kuprishuz@gmail.com> | 2010-01-24 12:59:29 -0500 |
---|---|---|
committer | Stefan Penner <stefan.penner@gmail.com> | 2010-01-27 12:44:33 -0600 |
commit | 133f6011d08ee043dcb5ae95bb441a81f6206bd9 (patch) | |
tree | f4182eacde22ff2f64b3998d2db1f4126107aea0 /actionpack/test | |
parent | 426a6b2e00665b04bab4fa5cee664fefd9957960 (diff) | |
download | rails-133f6011d08ee043dcb5ae95bb441a81f6206bd9.tar.gz rails-133f6011d08ee043dcb5ae95bb441a81f6206bd9.tar.bz2 rails-133f6011d08ee043dcb5ae95bb441a81f6206bd9.zip |
add missing :before and :after callbacks for link_to_remote
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/template/ajax_helper_test.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/actionpack/test/template/ajax_helper_test.rb b/actionpack/test/template/ajax_helper_test.rb index 095454977e..4d76007d52 100644 --- a/actionpack/test/template/ajax_helper_test.rb +++ b/actionpack/test/template/ajax_helper_test.rb @@ -86,6 +86,11 @@ class AjaxHelperTest < AjaxHelperBaseTest link_to_remote("Remote outauthor", :url => { :action => "whatnot" }, :position => :bottom) end + test "link_to_remote with before/after callbacks" do + assert_dom_equal %(<a href=\"#\" data-remote=\"true\" data-url=\"http://www.example.com/whatnot\" data-onbefore=\"before();\" data-onafter=\"after();\">Remote outauthor</a>), + link_to_remote("Remote outauthor", :url => { :action => "whatnot" }, :before => "before();", :after => "after();") + end + test "link_to_remote with method delete" do assert_dom_equal %(<a class=\"fine\" href=\"#\" data-remote=\"true\" data-url=\"http://www.example.com/whatnot\" data-method=\"delete\" rel=\"nofollow\">Remote outauthor</a>), link_to_remote("Remote outauthor", { :url => { :action => "whatnot" }, :method => "delete"}, { :class => "fine" }) |