aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/url_helper_test.rb
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2011-09-28 15:39:05 -0700
committerSantiago Pastorino <santiago@wyeworks.com>2011-09-28 15:39:05 -0700
commita5e731856b9a35ad0dee6dc1ab820a352fdaec77 (patch)
tree87647c2a947b9f60dae4cd23bc6323c2e2a83b6a /actionpack/test/template/url_helper_test.rb
parentcba3c00831a7c5bb25bc785e856984705ca2077c (diff)
parent3058d13a06d5472d25d89b55960565d6ba57f1ec (diff)
downloadrails-a5e731856b9a35ad0dee6dc1ab820a352fdaec77.tar.gz
rails-a5e731856b9a35ad0dee6dc1ab820a352fdaec77.tar.bz2
rails-a5e731856b9a35ad0dee6dc1ab820a352fdaec77.zip
Merge pull request #3156 from ihower/enhance_button_to_helper_v2
Make button_to helper support "form" option
Diffstat (limited to 'actionpack/test/template/url_helper_test.rb')
-rw-r--r--actionpack/test/template/url_helper_test.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/actionpack/test/template/url_helper_test.rb b/actionpack/test/template/url_helper_test.rb
index dbac2e1fc0..bc45fabf34 100644
--- a/actionpack/test/template/url_helper_test.rb
+++ b/actionpack/test/template/url_helper_test.rb
@@ -88,6 +88,10 @@ class UrlHelperTest < ActiveSupport::TestCase
)
end
+ def test_button_to_with_remote_and_form_options
+ assert_dom_equal "<form method=\"post\" action=\"http://www.example.com\" class=\"custom-class\" data-remote=\"true\" data-type=\"json\"><div><input type=\"submit\" value=\"Hello\" /></div></form>", button_to("Hello", "http://www.example.com", :remote => true, :form => { :class => "custom-class", "data-type" => "json" } )
+ end
+
def test_button_to_with_remote_and_javascript_confirm
assert_dom_equal(
"<form method=\"post\" action=\"http://www.example.com\" class=\"button_to\" data-remote=\"true\"><div><input data-confirm=\"Are you sure?\" type=\"submit\" value=\"Hello\" /></div></form>",