diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-12-30 19:41:25 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-12-30 19:41:25 +0000 |
commit | 00541f263b0aac16cdfcef68b4af5b1877f4dd02 (patch) | |
tree | 8969b86dcedf3f65ac9d50c5f2f9fdb4c086859c /actionpack/test/template | |
parent | 63c822afb22ea17cffd55a3d1c3472405e977be5 (diff) | |
download | rails-00541f263b0aac16cdfcef68b4af5b1877f4dd02.tar.gz rails-00541f263b0aac16cdfcef68b4af5b1877f4dd02.tar.bz2 rails-00541f263b0aac16cdfcef68b4af5b1877f4dd02.zip |
Added :disable_with option to FormTagHelper#submit_tag to allow for easily disabled submit buttons with different text [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3361 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test/template')
-rw-r--r-- | actionpack/test/template/form_tag_helper_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/actionpack/test/template/form_tag_helper_test.rb b/actionpack/test/template/form_tag_helper_test.rb index 401d3fbadc..438cd8f411 100644 --- a/actionpack/test/template/form_tag_helper_test.rb +++ b/actionpack/test/template/form_tag_helper_test.rb @@ -94,6 +94,13 @@ class FormTagHelperTest < Test::Unit::TestCase assert_dom_equal expected, actual end + def test_submit_tag + assert_dom_equal( + %(<input name='commit' type='submit' value='Save' onclick="this.disabled=true;this.value='Saving...';this.form.submit();alert('hello!')" />), + submit_tag("Save", :disable_with => "Saving...", :onclick => "alert('hello!')") + ) + end + def test_pass assert_equal 1, 1 end |