aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template
diff options
context:
space:
mode:
authorMichael Koziarski <michael@koziarski.com>2007-09-12 02:13:59 +0000
committerMichael Koziarski <michael@koziarski.com>2007-09-12 02:13:59 +0000
commit8a7d73cf4d3a92fd0546949f32c78fefffcb8bab (patch)
treea4888c9e1e0e8537766d95b5f5343afb769fabe0 /actionpack/test/template
parentc70fd5df7fd8af3a50539d6edf9c3453d2f892e8 (diff)
downloadrails-8a7d73cf4d3a92fd0546949f32c78fefffcb8bab.tar.gz
rails-8a7d73cf4d3a92fd0546949f32c78fefffcb8bab.tar.bz2
rails-8a7d73cf4d3a92fd0546949f32c78fefffcb8bab.zip
Tidy up link to remote options. Closes #9505. [nik.wakelin]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7468 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test/template')
-rw-r--r--actionpack/test/template/prototype_helper_test.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/actionpack/test/template/prototype_helper_test.rb b/actionpack/test/template/prototype_helper_test.rb
index a0217d84d1..4adfc90180 100644
--- a/actionpack/test/template/prototype_helper_test.rb
+++ b/actionpack/test/template/prototype_helper_test.rb
@@ -88,6 +88,11 @@ class PrototypeHelperTest < Test::Unit::TestCase
link_to_remote("Remote outauthor", :failure => "alert(request.reponseText)", :url => { :action => "whatnot", :a => '10', :b => '20' })
end
+ def test_link_to_remote_html_options
+ assert_dom_equal %(<a class=\"fine\" href=\"#\" onclick=\"new Ajax.Request('http://www.example.com/whatnot', {asynchronous:true, evalScripts:true}); return false;\">Remote outauthor</a>),
+ link_to_remote("Remote outauthor", { :url => { :action => "whatnot" }, :html => { :class => "fine" } })
+ end
+
def test_periodically_call_remote
assert_dom_equal %(<script type="text/javascript">\n//<![CDATA[\nnew PeriodicalExecuter(function() {new Ajax.Updater('schremser_bier', 'http://www.example.com/mehr_bier', {asynchronous:true, evalScripts:true})}, 10)\n//]]>\n</script>),
periodically_call_remote(:update => "schremser_bier", :url => { :action => "mehr_bier" })