From d925cd52ffe81b8bd8292af5fbf3ae8be1d69d21 Mon Sep 17 00:00:00 2001 From: Walderman Date: Fri, 18 Oct 2019 14:26:41 -0500 Subject: [PATCH] Add mode test cases --- form/bootstrap/form_for_test.go | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/form/bootstrap/form_for_test.go b/form/bootstrap/form_for_test.go index 094be5d..fea1337 100644 --- a/form/bootstrap/form_for_test.go +++ b/form/bootstrap/form_for_test.go @@ -355,7 +355,6 @@ func Test_Field_Boolean(t *testing.T) { }, output: ``, }, - { Value: true, name: "IsAdmin", @@ -365,6 +364,26 @@ func Test_Field_Boolean(t *testing.T) { }, output: ``, }, + { + Value: false, + name: "IsAdmin", + opts: tags.Options{}, + output: `
`, + }, + { + Value: true, + name: "IsAdmin", + opts: tags.Options{}, + output: `
`, + }, + { + Value: false, + name: "IsAdmin", + opts: tags.Options{ + "unchecked": false, + }, + output: `
`, + }, } for index, tcase := range cases {