diff options
author | Damien Mathieu <42@dmathieu.com> | 2012-01-06 17:14:49 +0100 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2012-01-27 10:06:49 -0200 |
commit | defb751681640e11f2187439acdaaa12ca9b805f (patch) | |
tree | 65e9d67abbca128dab776d1faedfa40da4f126ef /actionpack/test/template/form_helper_test.rb | |
parent | 19be5ea877a9e58e22210673d11ee8b7344c3778 (diff) | |
download | rails-defb751681640e11f2187439acdaaa12ca9b805f.tar.gz rails-defb751681640e11f2187439acdaaa12ca9b805f.tar.bz2 rails-defb751681640e11f2187439acdaaa12ca9b805f.zip |
don't set the hidden checkbox value if it's nil
Diffstat (limited to 'actionpack/test/template/form_helper_test.rb')
-rw-r--r-- | actionpack/test/template/form_helper_test.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/actionpack/test/template/form_helper_test.rb b/actionpack/test/template/form_helper_test.rb index 670cecfb9e..6e26fe752e 100644 --- a/actionpack/test/template/form_helper_test.rb +++ b/actionpack/test/template/form_helper_test.rb @@ -373,6 +373,14 @@ class FormHelperTest < ActionView::TestCase ) end + def test_check_box_with_nil_unchecked_value + @post.secret = "on" + assert_dom_equal( + '<input checked="checked" id="post_secret" name="post[secret]" type="checkbox" value="on" />', + check_box("post", "secret", {}, "on", nil) + ) + end + def test_check_box_with_multiple_behavior @post.comment_ids = [2,3] assert_dom_equal( |