diff options
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/javascript/ajax_test.rb | 12 |
1 files changed, 11 insertions, 1 deletions
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 = %(<input class="fine" type="submit" name="foo" value="bar" data-url="/url/hash" data-js-type="remote" data-update-success=".klass" />) + 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") |