diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-08-01 15:12:53 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-08-01 15:15:06 -0300 |
commit | 89177ba2000d6f587364d7ed8f8bf7ecd92e17cf (patch) | |
tree | 4b7ed12cc485ca34b834ec9162cf813c89ca8c3a /actionpack/test/template/form_tag_helper_test.rb | |
parent | 736bf14d7c15776f17f6e096dba5024a36d15580 (diff) | |
download | rails-89177ba2000d6f587364d7ed8f8bf7ecd92e17cf.tar.gz rails-89177ba2000d6f587364d7ed8f8bf7ecd92e17cf.tar.bz2 rails-89177ba2000d6f587364d7ed8f8bf7ecd92e17cf.zip |
Revert "Deprecate `:confirm` in favor of `:data => { :confirm => 'Text' }` option"
Revert "Deprecate `:disable_with` in favor of `'data-disable-with'` option for `button_to` and `submit_tag` helpers."
This reverts commit fc092a9cba5fceec38358072e50e09250cf58840.
This reverts commit e9051e20aeb2c666db06b6217954737665878db7.
This reverts commit d47d6e7eda3aa3e6aa28d0c17ac6801234bb97d1.
This reverts commit 21141e777bdce8534e3755c8de7268324b3d8714.
Diffstat (limited to 'actionpack/test/template/form_tag_helper_test.rb')
-rw-r--r-- | actionpack/test/template/form_tag_helper_test.rb | 77 |
1 files changed, 14 insertions, 63 deletions
diff --git a/actionpack/test/template/form_tag_helper_test.rb b/actionpack/test/template/form_tag_helper_test.rb index c0f300884a..dcc6dd0411 100644 --- a/actionpack/test/template/form_tag_helper_test.rb +++ b/actionpack/test/template/form_tag_helper_test.rb @@ -367,46 +367,31 @@ 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_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!')") - ) - end + 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!')") + ) 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_dom_equal( - %(<input name='commit' data-disable-with="Saving..." type="submit" value="Save" />), - submit_tag("Save", :disable_with => "Saving...") - ) - end + assert_dom_equal( + %(<input name='commit' data-disable-with="Saving..." type="submit" value="Save" />), + submit_tag("Save", :disable_with => "Saving...") + ) end def test_submit_tag_with_confirmation - assert_deprecated ":confirm option is deprecated and will be removed from Rails 4.0. Use ':data => { :confirm => \'Text\' }' instead" do - assert_dom_equal( - %(<input name='commit' type='submit' value='Save' data-confirm="Are you sure?" />), - submit_tag("Save", :confirm => "Are you sure?") - ) - end - end - - def test_submit_tag_with_confirmation_without_deprecation_warning assert_dom_equal( %(<input name='commit' type='submit' value='Save' data-confirm="Are you sure?" />), - submit_tag("Save", :data => { :confirm => "Are you sure?" }) + submit_tag("Save", :confirm => "Are you sure?") ) 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_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?") - ) - end + 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?") + ) end def test_button_tag @@ -430,31 +415,6 @@ class FormTagHelperTest < ActionView::TestCase ) end - def test_button_tag_with_confirmation - assert_deprecated ":confirm option is deprecated and will be removed from Rails 4.0. Use ':data => { :confirm => \'Text\' }' instead" do - assert_dom_equal( - %(<button name="button" type="submit" data-confirm="Are you sure?">Save</button>), - button_tag("Save", :type => "submit", :confirm => "Are you sure?") - ) - end - end - - def test_button_tag_with_confirmation_without_deprecation_warning - assert_dom_equal( - %(<button name="button" type="submit" data-confirm="Are you sure?">Save</button>), - button_tag("Save", :type => "submit", :data => { :confirm => "Are you sure?" }) - ) - 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>), @@ -486,18 +446,9 @@ class FormTagHelperTest < ActionView::TestCase end def test_image_submit_tag_with_confirmation - assert_deprecated ":confirm option is deprecated and will be removed from Rails 4.0. Use ':data => { :confirm => \'Text\' }' instead" do - assert_dom_equal( - %(<input type="image" src="/images/save.gif" data-confirm="Are you sure?" />), - image_submit_tag("save.gif", :confirm => "Are you sure?") - ) - end - end - - def test_image_submit_tag_with_confirmation_without_deprecation_warning assert_dom_equal( %(<input type="image" src="/images/save.gif" data-confirm="Are you sure?" />), - image_submit_tag("save.gif", :data => { :confirm => "Are you sure?" }) + image_submit_tag("save.gif", :confirm => "Are you sure?") ) end |