diff options
Diffstat (limited to 'actionpack/test/template/form_helper_test.rb')
-rw-r--r-- | actionpack/test/template/form_helper_test.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/actionpack/test/template/form_helper_test.rb b/actionpack/test/template/form_helper_test.rb index 4538b6dc6f..af99e6243d 100644 --- a/actionpack/test/template/form_helper_test.rb +++ b/actionpack/test/template/form_helper_test.rb @@ -181,6 +181,17 @@ class FormHelperTest < ActionView::TestCase '<input checked="checked" id="post_secret" name="post[secret]" type="checkbox" value="1" /><input name="post[secret]" type="hidden" value="0" />', check_box("post", "secret?") ) + + @post.secret = ['0'] + assert_dom_equal( + '<input id="post_secret" name="post[secret]" type="checkbox" value="1" /><input name="post[secret]" type="hidden" value="0" />', + check_box("post", "secret") + ) + @post.secret = ['1'] + assert_dom_equal( + '<input checked="checked" id="post_secret" name="post[secret]" type="checkbox" value="1" /><input name="post[secret]" type="hidden" value="0" />', + check_box("post", "secret") + ) end def test_check_box_with_explicit_checked_and_unchecked_values |