diff options
author | Tadas Tamošauskas <tadastoo@yahoo.com> | 2012-01-05 22:35:10 +0000 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2012-01-27 10:06:44 -0200 |
commit | 19be5ea877a9e58e22210673d11ee8b7344c3778 (patch) | |
tree | 63efd117fa6cb934402c1c4a6560afd3d95f8bff /actionpack/test | |
parent | 1c5bd8a33dd7002c8664e587f968830c1bce3ff8 (diff) | |
download | rails-19be5ea877a9e58e22210673d11ee8b7344c3778.tar.gz rails-19be5ea877a9e58e22210673d11ee8b7344c3778.tar.bz2 rails-19be5ea877a9e58e22210673d11ee8b7344c3778.zip |
check_box helper with :disabled => true generates disabled hidden field. fixes #1953
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/template/form_helper_test.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/actionpack/test/template/form_helper_test.rb b/actionpack/test/template/form_helper_test.rb index 73b936b16e..670cecfb9e 100644 --- a/actionpack/test/template/form_helper_test.rb +++ b/actionpack/test/template/form_helper_test.rb @@ -385,11 +385,10 @@ class FormHelperTest < ActionView::TestCase ) end - - def test_checkbox_disabled_still_submits_checked_value + def test_checkbox_disabled_disables_hidden_field assert_dom_equal( - '<input name="post[secret]" type="hidden" value="1" /><input checked="checked" disabled="disabled" id="post_secret" name="post[secret]" type="checkbox" value="1" />', - check_box("post", "secret", { :disabled => :true }) + '<input name="post[secret]" type="hidden" value="0" disabled="disabled"/><input checked="checked" disabled="disabled" id="post_secret" name="post[secret]" type="checkbox" value="1" />', + check_box("post", "secret", { :disabled => true }) ) end |