diff options
author | Erik St. Martin <alakriti@gmail.com> | 2010-01-26 10:54:59 -0500 |
---|---|---|
committer | Stefan Penner <stefan.penner@gmail.com> | 2010-01-27 12:44:35 -0600 |
commit | ad26b3934ecb9f5034453b4cd7d924048798d429 (patch) | |
tree | 86b0918b592109c05945ea86f90a4335fd11bf48 /actionpack/test/template | |
parent | 9fe845670daa15fac72df826138206471c8398a0 (diff) | |
download | rails-ad26b3934ecb9f5034453b4cd7d924048798d429.tar.gz rails-ad26b3934ecb9f5034453b4cd7d924048798d429.tar.bz2 rails-ad26b3934ecb9f5034453b4cd7d924048798d429.zip |
test to go with last commit, explicit :href for link_to_remote
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 4a84ce47e0..d31e4daf08 100644 --- a/actionpack/test/template/ajax_helper_test.rb +++ b/actionpack/test/template/ajax_helper_test.rb @@ -101,6 +101,11 @@ class AjaxHelperTest < AjaxHelperBaseTest assert_dom_equal expected, link_to_remote("Remote outauthor", :url => { :action => "whatnot" }, :condition => '$(\'foo\').val() == true') end + test "link_to_remote using explicit :href" do + expected = %(<a href=\"http://www.example.com/testhref\" data-remote=\"true\" data-url=\"http://www.example.com/whatnot\" data-condition=\"$('foo').val() == true\">Remote outauthor</a>) + assert_dom_equal expected, link_to_remote("Remote outauthor", :href => 'http://www.example.com/testhref', :url => { :action => "whatnot" }, :condition => '$(\'foo\').val() == true') + end + test "link_to_remote using :submit" do expected = %(<a href=\"#\" data-remote=\"true\" data-url=\"http://www.example.com/whatnot\" data-submit=\"myForm\">Remote outauthor</a>) assert_dom_equal expected, link_to_remote("Remote outauthor", :url => { :action => "whatnot" }, :submit => 'myForm') |