diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2007-10-23 19:25:28 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2007-10-23 19:25:28 +0000 |
commit | 8091ed54205a20f3756be3af0d64f98d59276c1d (patch) | |
tree | aaa4c88d7b2f4af18eb1166b20b38eef67586734 /actionpack/test/template | |
parent | c8b6b4821ff3f8135a22728bdf989e585a38d343 (diff) | |
download | rails-8091ed54205a20f3756be3af0d64f98d59276c1d.tar.gz rails-8091ed54205a20f3756be3af0d64f98d59276c1d.tar.bz2 rails-8091ed54205a20f3756be3af0d64f98d59276c1d.zip |
Disabled checkboxes don't submit a form value. Closes #9301.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8007 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test/template')
-rw-r--r-- | actionpack/test/template/form_helper_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/actionpack/test/template/form_helper_test.rb b/actionpack/test/template/form_helper_test.rb index 32529c66f7..d00bd16ad8 100644 --- a/actionpack/test/template/form_helper_test.rb +++ b/actionpack/test/template/form_helper_test.rb @@ -172,6 +172,13 @@ class FormHelperTest < Test::Unit::TestCase ) end + def test_checkbox_disabled_still_submits_checked_value + assert_dom_equal( + '<input checked="checked" disabled="disabled" id="post_secret" name="post[secret]" type="checkbox" value="1" /><input name="post[secret]" type="hidden" value="1" />', + check_box("post", "secret", { :disabled => :true }) + ) + end + def test_radio_button assert_dom_equal('<input checked="checked" id="post_title_hello_world" name="post[title]" type="radio" value="Hello World" />', radio_button("post", "title", "Hello World") |