mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-30 22:39:58 +02:00
@@ -26,7 +26,7 @@ func init() {
|
||||
|
||||
ns := &internal.TemplateFuncsNamespace{
|
||||
Name: name,
|
||||
Context: func(args ...interface{}) interface{} { return ctx },
|
||||
Context: func(args ...interface{}) (interface{}, error) { return ctx, nil },
|
||||
}
|
||||
|
||||
ns.AddMethodMapping(ctx.Add,
|
||||
|
@@ -36,5 +36,7 @@ func TestInit(t *testing.T) {
|
||||
}
|
||||
|
||||
c.Assert(found, qt.Equals, true)
|
||||
c.Assert(ns.Context(), hqt.IsSameType, &Namespace{})
|
||||
ctx, err := ns.Context()
|
||||
c.Assert(err, qt.IsNil)
|
||||
c.Assert(ctx, hqt.IsSameType, &Namespace{})
|
||||
}
|
||||
|
Reference in New Issue
Block a user