summaryrefslogtreecommitdiffstats
path: root/output/layout_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'output/layout_test.go')
-rw-r--r--output/layout_test.go10
1 files changed, 8 insertions, 2 deletions
diff --git a/output/layout_test.go b/output/layout_test.go
index b38bd9c13..e59a16fcb 100644
--- a/output/layout_test.go
+++ b/output/layout_test.go
@@ -68,8 +68,9 @@ func TestLayout(t *testing.T) {
t.Run(this.name, func(t *testing.T) {
l := NewLayoutHandler(this.hasTheme)
- layouts := l.For(this.d, this.layoutOverride, this.tp)
+ layouts, err := l.For(this.d, this.layoutOverride, this.tp)
+ require.NoError(t, err)
require.NotNil(t, layouts)
require.True(t, len(layouts) >= len(this.expect))
// Not checking the complete list for now ...
@@ -83,6 +84,10 @@ func TestLayout(t *testing.T) {
})
}
+ l := NewLayoutHandler(false)
+ _, err := l.For(LayoutDescriptor{Kind: "taxonomyTerm", Section: "tag"}, "override", RSSFormat)
+ require.Error(t, err)
+
}
func BenchmarkLayout(b *testing.B) {
@@ -90,7 +95,8 @@ func BenchmarkLayout(b *testing.B) {
l := NewLayoutHandler(false)
for i := 0; i < b.N; i++ {
- layouts := l.For(descriptor, "", HTMLFormat)
+ layouts, err := l.For(descriptor, "", HTMLFormat)
+ require.NoError(b, err)
require.NotEmpty(b, layouts)
}
}