about summary refs log tree commit diff stats
path: root/el/content_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'el/content_test.go')
-rw-r--r--el/content_test.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/el/content_test.go b/el/content_test.go
index b31ad2d..9cb1d52 100644
--- a/el/content_test.go
+++ b/el/content_test.go
@@ -37,3 +37,15 @@ func TestP(t *testing.T) {
 		assert.Equal(t, `<p>hat</p>`, el.P(g.Text("hat")))
 	})
 }
+
+func TestBr(t *testing.T) {
+	t.Run("returns a br element in context", func(t *testing.T) {
+		assert.Equal(t, `<p>Test<br />Me</p>`, el.P(g.Text("Test"), el.Br(), g.Text("Me")))
+	})
+}
+
+func TestHr(t *testing.T) {
+	t.Run("returns a hr element with class", func(t *testing.T) {
+		assert.Equal(t, `<hr class="test" />`, el.Hr(g.Attr("class", "test")))
+	})
+}