aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/prototype_helper_test.rb
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2010-01-30 15:20:00 -0600
committerJoshua Peek <josh@joshpeek.com>2010-01-30 15:20:00 -0600
commitb3787643ec4b24b4628e29ebccc5fb517b01b824 (patch)
tree6dc9ab754d96245ab96e4f43df154dd0495bd7ed /actionpack/test/template/prototype_helper_test.rb
parent2de311a09363f0e7bb4e21cef8e77df7ee92d33f (diff)
downloadrails-b3787643ec4b24b4628e29ebccc5fb517b01b824.tar.gz
rails-b3787643ec4b24b4628e29ebccc5fb517b01b824.tar.bz2
rails-b3787643ec4b24b4628e29ebccc5fb517b01b824.zip
Move link_to_function and link_to_remote into prototype_legacy_helper
plugin
Diffstat (limited to 'actionpack/test/template/prototype_helper_test.rb')
-rw-r--r--actionpack/test/template/prototype_helper_test.rb28
1 files changed, 0 insertions, 28 deletions
diff --git a/actionpack/test/template/prototype_helper_test.rb b/actionpack/test/template/prototype_helper_test.rb
index 4e37de2aef..fd868efecd 100644
--- a/actionpack/test/template/prototype_helper_test.rb
+++ b/actionpack/test/template/prototype_helper_test.rb
@@ -82,33 +82,6 @@ class PrototypeHelperTest < PrototypeHelperBaseTest
super
end
- def test_link_to_remote
- 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" }}, { :class => "fine" })
- assert_dom_equal %(<a href=\"#\" onclick=\"new Ajax.Request('http://www.example.com/whatnot', {asynchronous:true, evalScripts:true, onComplete:function(request){alert(request.responseText)}}); return false;\">Remote outauthor</a>),
- link_to_remote("Remote outauthor", :complete => "alert(request.responseText)", :url => { :action => "whatnot" })
- assert_dom_equal %(<a href=\"#\" onclick=\"new Ajax.Request('http://www.example.com/whatnot', {asynchronous:true, evalScripts:true, onSuccess:function(request){alert(request.responseText)}}); return false;\">Remote outauthor</a>),
- link_to_remote("Remote outauthor", :success => "alert(request.responseText)", :url => { :action => "whatnot" })
- assert_dom_equal %(<a href=\"#\" onclick=\"new Ajax.Request('http://www.example.com/whatnot', {asynchronous:true, evalScripts:true, onFailure:function(request){alert(request.responseText)}}); return false;\">Remote outauthor</a>),
- link_to_remote("Remote outauthor", :failure => "alert(request.responseText)", :url => { :action => "whatnot" })
- assert_dom_equal %(<a href=\"#\" onclick=\"new Ajax.Request('http://www.example.com/whatnot?a=10&amp;b=20', {asynchronous:true, evalScripts:true, onFailure:function(request){alert(request.responseText)}}); return false;\">Remote outauthor</a>),
- link_to_remote("Remote outauthor", :failure => "alert(request.responseText)", :url => { :action => "whatnot", :a => '10', :b => '20' })
- assert_dom_equal %(<a href=\"#\" onclick=\"new Ajax.Request('http://www.example.com/whatnot', {asynchronous:false, evalScripts:true}); return false;\">Remote outauthor</a>),
- link_to_remote("Remote outauthor", :url => { :action => "whatnot" }, :type => :synchronous)
- assert_dom_equal %(<a href=\"#\" onclick=\"new Ajax.Request('http://www.example.com/whatnot', {asynchronous:true, evalScripts:true, insertion:'bottom'}); return false;\">Remote outauthor</a>),
- link_to_remote("Remote outauthor", :url => { :action => "whatnot" }, :position => :bottom)
- 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_link_to_remote_url_quote_escaping
- assert_dom_equal %(<a href="#" onclick="new Ajax.Request('http://www.example.com/whatnot\\\'s', {asynchronous:true, evalScripts:true}); return false;">Remote</a>),
- link_to_remote("Remote", { :url => { :action => "whatnot's" } })
- end
-
def test_button_to_remote
assert_dom_equal %(<input class=\"fine\" type=\"button\" value=\"Remote outpost\" onclick=\"new Ajax.Request('http://www.example.com/whatnot', {asynchronous:true, evalScripts:true});\" />),
button_to_remote("Remote outpost", { :url => { :action => "whatnot" }}, { :class => "fine" })
@@ -610,4 +583,3 @@ return value.reverse();
assert_equal "MyObject.myMethod(function() { $(\"one\").show();\n$(\"two\").hide(); });", @generator.to_s
end
end
-