From 8de5a685efbc6f13e606dcd70d15b757e3f9ad9a Mon Sep 17 00:00:00 2001 From: Markus Wüstenberg Date: Mon, 21 Sep 2020 11:23:47 +0200 Subject: Add a lot of common elements (#10) Especially add elements that are either used in every document, that nearly always have text content, or that are almost always used with certain attributes.--- el/elements_test.go | 126 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 126 insertions(+) (limited to 'el/elements_test.go') diff --git a/el/elements_test.go b/el/elements_test.go index eb0db47..0eee5f3 100644 --- a/el/elements_test.go +++ b/el/elements_test.go @@ -37,3 +37,129 @@ func TestTitle(t *testing.T) { assert.Equal(t, "hat", el.Title("hat")) }) } + +func TestMeta(t *testing.T) { + t.Run("returns a meta element", func(t *testing.T) { + assert.Equal(t, ``, el.Meta(g.Attr("charset", "utf-8"))) + }) +} + +func TestLink(t *testing.T) { + t.Run("returns a link element", func(t *testing.T) { + assert.Equal(t, ``, el.Link(g.Attr("rel", "stylesheet"))) + }) +} + +func TestStyle(t *testing.T) { + t.Run("returns a style element", func(t *testing.T) { + assert.Equal(t, `