diff options
Diffstat (limited to 'resources/page/testhelpers_test.go')
-rw-r--r-- | resources/page/testhelpers_test.go | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/resources/page/testhelpers_test.go b/resources/page/testhelpers_test.go index 60a6c0816..fa5f8e9c8 100644 --- a/resources/page/testhelpers_test.go +++ b/resources/page/testhelpers_test.go @@ -16,10 +16,11 @@ package page import ( "fmt" "html/template" - "os" "path/filepath" "time" + "github.com/gohugoio/hugo/modules" + "github.com/bep/gitmap" "github.com/gohugoio/hugo/helpers" "github.com/gohugoio/hugo/resources/resource" @@ -65,6 +66,12 @@ func newTestPathSpec() *helpers.PathSpec { func newTestPathSpecFor(cfg config.Provider) *helpers.PathSpec { config.SetBaseTestDefaults(cfg) + langs.LoadLanguageSettings(cfg, nil) + mod, err := modules.CreateProjectModule(cfg) + if err != nil { + panic(err) + } + cfg.Set("allModules", modules.Modules{mod}) fs := hugofs.NewMem(cfg) s, err := helpers.NewPathSpec(fs, cfg) if err != nil { @@ -189,7 +196,7 @@ func (p *testPage) File() source.File { return p.file } -func (p *testPage) FileInfo() os.FileInfo { +func (p *testPage) FileInfo() hugofs.FileMetaInfo { panic("not implemented") } |