From 683fc4db00f496e5225928afb4d4e932e0fcdc48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Galdino=20+=20Rafael=20Mendon=C3=A7a=20Fran=C3=A7?= =?UTF-8?q?a?= Date: Mon, 14 May 2012 16:40:43 -0300 Subject: Remove `:disable_with` in favor of `'data-disable-with'` option from `submit_tag`, `button_tag` and `button_to` helpers. --- actionpack/test/template/form_tag_helper_test.rb | 16 +--------------- actionpack/test/template/url_helper_test.rb | 16 +--------------- 2 files changed, 2 insertions(+), 30 deletions(-) (limited to 'actionpack/test/template') diff --git a/actionpack/test/template/form_tag_helper_test.rb b/actionpack/test/template/form_tag_helper_test.rb index 1e92ff99ff..7a645217b8 100644 --- a/actionpack/test/template/form_tag_helper_test.rb +++ b/actionpack/test/template/form_tag_helper_test.rb @@ -375,14 +375,7 @@ class FormTagHelperTest < ActionView::TestCase def test_submit_tag assert_dom_equal( %(), - submit_tag("Save", :disable_with => "Saving...", :onclick => "alert('hello!')") - ) - end - - def test_submit_tag_with_no_onclick_options - assert_dom_equal( - %(), - submit_tag("Save", :disable_with => "Saving...") + submit_tag("Save", 'data-disable-with' => "Saving...", :onclick => "alert('hello!')") ) end @@ -393,13 +386,6 @@ class FormTagHelperTest < ActionView::TestCase ) end - def test_submit_tag_with_confirmation_and_with_disable_with - assert_dom_equal( - %(), - submit_tag("Save", :disable_with => "Saving...", :confirm => "Are you sure?") - ) - end - def test_button_tag assert_dom_equal( %(), diff --git a/actionpack/test/template/url_helper_test.rb b/actionpack/test/template/url_helper_test.rb index eaa8bdbd26..fb5b35bac6 100644 --- a/actionpack/test/template/url_helper_test.rb +++ b/actionpack/test/template/url_helper_test.rb @@ -97,7 +97,7 @@ class UrlHelperTest < ActiveSupport::TestCase def test_button_to_with_javascript_disable_with assert_dom_equal( "
", - button_to("Hello", "http://www.example.com", :disable_with => "Greeting...") + button_to("Hello", "http://www.example.com", 'data-disable-with' => "Greeting...") ) end @@ -112,20 +112,6 @@ class UrlHelperTest < ActiveSupport::TestCase ) end - def test_button_to_with_remote_and_javascript_disable_with - assert_dom_equal( - "
", - button_to("Hello", "http://www.example.com", :remote => true, :disable_with => "Greeting...") - ) - end - - def test_button_to_with_remote_and_javascript_confirm_and_javascript_disable_with - assert_dom_equal( - "
", - button_to("Hello", "http://www.example.com", :remote => true, :confirm => "Are you sure?", :disable_with => "Greeting...") - ) - end - def test_button_to_with_remote_false assert_dom_equal( "
", -- cgit v1.2.3