From 496ee0cd1b2840fcccfa2695b8489463a548cc34 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Thu, 19 May 2005 17:27:08 +0000 Subject: Fixed that FormHelper#checkbox should return a checked checkbox if the value is the same as checked_value #1286 [Florian Weber] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1317 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/test/template/form_helper_test.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'actionpack/test') diff --git a/actionpack/test/template/form_helper_test.rb b/actionpack/test/template/form_helper_test.rb index 21b9c24344..4e1af744b5 100644 --- a/actionpack/test/template/form_helper_test.rb +++ b/actionpack/test/template/form_helper_test.rb @@ -80,6 +80,14 @@ class FormHelperTest < Test::Unit::TestCase check_box("post", "secret") ) end + + def test_check_box_with_explicit_checked_and_unchecked_values + @post.secret = "on" + assert_equal( + '', + check_box("post", "secret", {}, "on", "off") + ) + end def test_radio_button assert_equal('', -- cgit v1.2.3