Permalink
Browse files

test to go with last commit, explicit :href for link_to_remote

  • Loading branch information...
1 parent 9fe8456 commit ad26b3934ecb9f5034453b4cd7d924048798d429 @erikstmartin erikstmartin committed with stefanpenner Jan 26, 2010
Showing with 5 additions and 0 deletions.
  1. +5 −0 actionpack/test/template/ajax_helper_test.rb
@@ -101,6 +101,11 @@ def setup
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')

0 comments on commit ad26b39

Please sign in to comment.