From b4918d5a63434e162e5547cf0e8461fcd1931765 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20W=C3=BCstenberg?= Date: Tue, 22 Dec 2020 11:12:45 +0100 Subject: [PATCH] Add test for InputHidden (#60) --- components/elements_test.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 components/elements_test.go diff --git a/components/elements_test.go b/components/elements_test.go new file mode 100644 index 0000000..334ed2c --- /dev/null +++ b/components/elements_test.go @@ -0,0 +1,16 @@ +package components_test + +import ( + "testing" + + g "github.com/maragudk/gomponents" + "github.com/maragudk/gomponents/assert" + c "github.com/maragudk/gomponents/components" +) + +func TestInputHidden(t *testing.T) { + t.Run("returns an input element with type hidden, and the given name and value", func(t *testing.T) { + n := c.InputHidden("id", "partyhat", g.Attr("class", "hat")) + assert.Equal(t, ``, n) + }) +}