aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/template/form_helper_test.rb8
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 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(
+ '<input checked="checked" id="post_secret" name="post[secret]" type="checkbox" value="on" /><input name="post[secret]" type="hidden" value="off" />',
+ check_box("post", "secret", {}, "on", "off")
+ )
+ end
def test_radio_button
assert_equal('<input checked="checked" id="post_title_hello_world" name="post[title]" type="radio" value="Hello World" />',