diff options
author | Stephen St. Martin <kuprishuz@gmail.com> | 2010-01-24 09:09:10 -0500 |
---|---|---|
committer | Stefan Penner <stefan.penner@gmail.com> | 2010-01-27 12:44:33 -0600 |
commit | 9ad8d348b52e5603bb2432ee7fe326142ce5084b (patch) | |
tree | 569b81f1754d3896ed7b756183fe89b6a1aca171 /actionpack/test/template | |
parent | 9f5cb3d3b48d0e7d702144d87208ac18778e3d38 (diff) | |
download | rails-9ad8d348b52e5603bb2432ee7fe326142ce5084b.tar.gz rails-9ad8d348b52e5603bb2432ee7fe326142ce5084b.tar.bz2 rails-9ad8d348b52e5603bb2432ee7fe326142ce5084b.zip |
test :method option of link_to_remote, and ensure rel='nofollow' is added when :method => 'delete'
Diffstat (limited to 'actionpack/test/template')
-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 cb28448913..77d1510bab 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 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" }) + end + test "link_to_remote html options" do assert_dom_equal %(<a class=\"fine\" href=\"#\" data-remote=\"true\" data-url=\"http://www.example.com/whatnot\">Remote outauthor</a>), link_to_remote("Remote outauthor", { :url => { :action => "whatnot" }, :html => { :class => "fine" } }) |