summaryrefslogtreecommitdiffstats
path: root/tpl/collections/apply_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'tpl/collections/apply_test.go')
-rw-r--r--tpl/collections/apply_test.go14
1 files changed, 12 insertions, 2 deletions
diff --git a/tpl/collections/apply_test.go b/tpl/collections/apply_test.go
index 5b21d5a97..0d06f52e8 100644
--- a/tpl/collections/apply_test.go
+++ b/tpl/collections/apply_test.go
@@ -22,6 +22,7 @@ import (
qt "github.com/frankban/quicktest"
"github.com/gohugoio/hugo/deps"
+ "github.com/gohugoio/hugo/output"
"github.com/gohugoio/hugo/tpl"
)
@@ -31,10 +32,18 @@ func (templateFinder) Lookup(name string) (tpl.Template, bool) {
return nil, false
}
+func (templateFinder) HasTemplate(name string) bool {
+ return false
+}
+
func (templateFinder) LookupVariant(name string, variants tpl.TemplateVariants) (tpl.Template, bool, bool) {
return nil, false, false
}
+func (templateFinder) LookupLayout(d output.LayoutDescriptor, f output.Format) (tpl.Template, bool, error) {
+ return nil, false, nil
+}
+
func (templateFinder) Execute(t tpl.Template, wr io.Writer, data interface{}) error {
return nil
}
@@ -51,8 +60,9 @@ func (templateFinder) GetFunc(name string) (reflect.Value, bool) {
func TestApply(t *testing.T) {
t.Parallel()
c := qt.New(t)
-
- ns := New(&deps.Deps{Tmpl: new(templateFinder)})
+ d := &deps.Deps{}
+ d.SetTmpl(new(templateFinder))
+ ns := New(d)
strings := []interface{}{"a\n", "b\n"}