From 8c43c11a9dfd713cf613bb04c6074c82810d2f36 Mon Sep 17 00:00:00 2001 From: Bob Remeika Date: Wed, 4 Nov 2009 23:18:15 -0800 Subject: Added submit_to_remote helper --- actionpack/test/javascript/ajax_test.rb | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'actionpack/test') diff --git a/actionpack/test/javascript/ajax_test.rb b/actionpack/test/javascript/ajax_test.rb index f1207e938d..f4e766d77e 100644 --- a/actionpack/test/javascript/ajax_test.rb +++ b/actionpack/test/javascript/ajax_test.rb @@ -332,7 +332,7 @@ end class ButtonToRemoteTest < AjaxTestCase def button(options, html = {}) - button_to_remote("Remote outpost", options, html) + button_to_remote("RemoteOutpost", options, html) end def url_for(*) @@ -355,6 +355,16 @@ class ButtonToRemoteTest < AjaxTestCase end end +class SubmitToRemoteTest < AjaxTestCase + test "basic" do + expected = %() + options = { :url => {:action => "whatnot"}, :update => ".klass", :html => { :class => "fine" } } + + assert_dom_equal expected, + submit_to_remote("foo", "bar", options) + end +end + class ScriptDecoratorTest < AjaxTestCase def decorator() script_decorator("data-js-type" => "foo_type", "data-foo" => "bar", "data-baz" => "bang") -- cgit v1.2.3