diff options
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 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') |