aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/form_tag_helper_test.rb
diff options
context:
space:
mode:
authorCarlos Galdino + Rafael Mendonça França <rafael.franca+carlos.galdino@plataformatec.com.br>2012-05-14 16:55:13 -0300
committerCarlos Galdino + Rafael Mendonça França <rafael.franca+carlos.galdino@plataformatec.com.br>2012-05-14 16:55:13 -0300
commite9051e20aeb2c666db06b6217954737665878db7 (patch)
tree8f47ad006a0de1969030659337a4e92cca4a1216 /actionpack/test/template/form_tag_helper_test.rb
parentd47d6e7eda3aa3e6aa28d0c17ac6801234bb97d1 (diff)
downloadrails-e9051e20aeb2c666db06b6217954737665878db7.tar.gz
rails-e9051e20aeb2c666db06b6217954737665878db7.tar.bz2
rails-e9051e20aeb2c666db06b6217954737665878db7.zip
Deprecate `:disable_with` for `button_tag` too
Diffstat (limited to 'actionpack/test/template/form_tag_helper_test.rb')
-rw-r--r--actionpack/test/template/form_tag_helper_test.rb15
1 files changed, 12 insertions, 3 deletions
diff --git a/actionpack/test/template/form_tag_helper_test.rb b/actionpack/test/template/form_tag_helper_test.rb
index 1bfe2856dc..d9f91e952b 100644
--- a/actionpack/test/template/form_tag_helper_test.rb
+++ b/actionpack/test/template/form_tag_helper_test.rb
@@ -367,7 +367,7 @@ class FormTagHelperTest < ActionView::TestCase
end
def test_submit_tag
- assert_deprecated ":disable_with option is deprecated and will be removed from Rails 4.0. Use :data-disable-with instead" do
+ assert_deprecated ":disable_with option is deprecated and will be removed from Rails 4.0. Use 'data-disable-with' instead" do
assert_dom_equal(
%(<input name='commit' data-disable-with="Saving..." onclick="alert('hello!')" type="submit" value="Save" />),
submit_tag("Save", :disable_with => "Saving...", :onclick => "alert('hello!')")
@@ -376,7 +376,7 @@ class FormTagHelperTest < ActionView::TestCase
end
def test_submit_tag_with_no_onclick_options
- assert_deprecated ":disable_with option is deprecated and will be removed from Rails 4.0. Use :data-disable-with instead" do
+ assert_deprecated ":disable_with option is deprecated and will be removed from Rails 4.0. Use 'data-disable-with' instead" do
assert_dom_equal(
%(<input name='commit' data-disable-with="Saving..." type="submit" value="Save" />),
submit_tag("Save", :disable_with => "Saving...")
@@ -392,7 +392,7 @@ class FormTagHelperTest < ActionView::TestCase
end
def test_submit_tag_with_confirmation_and_with_disable_with
- assert_deprecated ":disable_with option is deprecated and will be removed from Rails 4.0. Use :data-disable-with instead" do
+ assert_deprecated ":disable_with option is deprecated and will be removed from Rails 4.0. Use 'data-disable-with' instead" do
assert_dom_equal(
%(<input name="commit" data-disable-with="Saving..." data-confirm="Are you sure?" type="submit" value="Save" />),
submit_tag("Save", :disable_with => "Saving...", :confirm => "Are you sure?")
@@ -421,6 +421,15 @@ class FormTagHelperTest < ActionView::TestCase
)
end
+ def test_button_tag_with_disable_with
+ assert_deprecated ":disable_with option is deprecated and will be removed from Rails 4.0. Use 'data-disable-with' instead" do
+ assert_dom_equal(
+ %(<button name="button" data-disable-with="Saving..." type="submit">Save</button>),
+ button_tag("Save", :type => "submit", :disable_with => "Saving...")
+ )
+ end
+ end
+
def test_button_tag_with_reset_type
assert_dom_equal(
%(<button name="button" type="reset">Reset</button>),