diff options
author | José Valim <jose.valim@gmail.com> | 2012-05-15 10:06:27 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2012-05-15 10:08:51 +0200 |
commit | dd42e8905830f96db29d49ed4bd44eeca5195de3 (patch) | |
tree | ccfe23003e59dbba9e3f73f0b3ea0e1bad691eb1 /actionpack/test/template/form_tag_helper_test.rb | |
parent | a5c38a9c087e33d36397afc496be7c8e01b37ef0 (diff) | |
download | rails-dd42e8905830f96db29d49ed4bd44eeca5195de3.tar.gz rails-dd42e8905830f96db29d49ed4bd44eeca5195de3.tar.bz2 rails-dd42e8905830f96db29d49ed4bd44eeca5195de3.zip |
Revert "Revert "Remove `:disable_with` in favor of `'data-disable-with'` option from `submit_tag`, `button_tag` and `button_to` helpers.""
Finally remove `:disable_with` but use `:data => { :disable_with => ... }`
in examples to show off a better API (which looks nicer in Ruby 1.9)
This reverts commit a5c38a9c087e33d36397afc496be7c8e01b37ef0.
Diffstat (limited to 'actionpack/test/template/form_tag_helper_test.rb')
-rw-r--r-- | actionpack/test/template/form_tag_helper_test.rb | 16 |
1 files changed, 1 insertions, 15 deletions
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( %(<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_dom_equal( - %(<input name='commit' data-disable-with="Saving..." type="submit" value="Save" />), - 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( - %(<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 assert_dom_equal( %(<button name="button" type="submit">Button</button>), |