diff options
author | Markus Wüstenberg | 2020-09-25 17:36:21 +0200 |
---|---|---|
committer | GitHub | 2020-09-25 17:36:21 +0200 |
commit | 4448a48d85e15895ce68c3d2b9ca009a222fcd2a (patch) | |
tree | c59978bc25ce95b3df1129f5fffb8fc0bf510b5c /el/section_test.go | |
parent | 83faa4caa3e2686ecbfb54ab9c9024c408453563 (diff) | |
download | gomponents-4448a48d85e15895ce68c3d2b9ca009a222fcd2a.tar.lz gomponents-4448a48d85e15895ce68c3d2b9ca009a222fcd2a.tar.zst gomponents-4448a48d85e15895ce68c3d2b9ca009a222fcd2a.zip |
Add remaining sectioning elements as helpers (#25)
Fixes #22.
Diffstat (limited to 'el/section_test.go')
-rw-r--r-- | el/section_test.go | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/el/section_test.go b/el/section_test.go index 5147e04..11c60fb 100644 --- a/el/section_test.go +++ b/el/section_test.go @@ -8,6 +8,36 @@ import ( "github.com/maragudk/gomponents/el" ) +func TestAddress(t *testing.T) { + t.Run("returns an address element", func(t *testing.T) { + assert.Equal(t, `<address />`, el.Address()) + }) +} + +func TestArticle(t *testing.T) { + t.Run("returns an article element", func(t *testing.T) { + assert.Equal(t, `<article />`, el.Article()) + }) +} + +func TestAside(t *testing.T) { + t.Run("returns an aside element", func(t *testing.T) { + assert.Equal(t, `<aside />`, el.Aside()) + }) +} + +func TestFooter(t *testing.T) { + t.Run("returns a footer element", func(t *testing.T) { + assert.Equal(t, `<footer />`, el.Footer()) + }) +} + +func TestHeader(t *testing.T) { + t.Run("returns a header element", func(t *testing.T) { + assert.Equal(t, `<header />`, el.Header()) + }) +} + func TestH1(t *testing.T) { t.Run("returns an h1 element", func(t *testing.T) { assert.Equal(t, `<h1 id="headline">hat</h1>`, el.H1("hat", g.Attr("id", "headline"))) @@ -43,3 +73,27 @@ func TestH6(t *testing.T) { assert.Equal(t, `<h6 id="headline">hat</h6>`, el.H6("hat", g.Attr("id", "headline"))) }) } + +func TestHGroup(t *testing.T) { + t.Run("returns an hgroup element", func(t *testing.T) { + assert.Equal(t, `<hgroup />`, el.HGroup()) + }) +} + +func TestMainEl(t *testing.T) { + t.Run("returns a main element", func(t *testing.T) { + assert.Equal(t, `<main />`, el.Main()) + }) +} + +func TestNav(t *testing.T) { + t.Run("returns a nav element", func(t *testing.T) { + assert.Equal(t, `<nav />`, el.Nav()) + }) +} + +func TestSection(t *testing.T) { + t.Run("returns a section element", func(t *testing.T) { + assert.Equal(t, `<section />`, el.Section()) + }) +} |