diff options
Diffstat (limited to 'hugolib/page_test.go')
-rw-r--r-- | hugolib/page_test.go | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/hugolib/page_test.go b/hugolib/page_test.go index d29a4f865..c16754cd9 100644 --- a/hugolib/page_test.go +++ b/hugolib/page_test.go @@ -23,7 +23,6 @@ import ( "time" "github.com/gohugoio/hugo/htesting" - "github.com/gohugoio/hugo/markup/asciidocext" "github.com/gohugoio/hugo/markup/rst" @@ -35,7 +34,6 @@ import ( "github.com/gohugoio/hugo/resources/page" "github.com/gohugoio/hugo/resources/resource" - "github.com/spf13/afero" "github.com/spf13/jwalterweatherman" qt "github.com/frankban/quicktest" @@ -1031,14 +1029,14 @@ func TestPageWithLastmodFromGitInfo(t *testing.T) { } c := qt.New(t) - // We need to use the OS fs for this. - cfg := config.New() - fs := hugofs.NewFrom(hugofs.Os, cfg) - fs.Destination = &afero.MemMapFs{} - wd, err := os.Getwd() c.Assert(err, qt.IsNil) + // We need to use the OS fs for this. + cfg := config.NewWithTestDefaults() + cfg.Set("workingDir", filepath.Join(wd, "testsite")) + fs := hugofs.NewFrom(hugofs.Os, cfg) + cfg.Set("frontmatter", map[string]any{ "lastmod": []string{":git", "lastmod"}, }) @@ -1060,8 +1058,6 @@ func TestPageWithLastmodFromGitInfo(t *testing.T) { cfg.Set("languages", langConfig) cfg.Set("enableGitInfo", true) - cfg.Set("workingDir", filepath.Join(wd, "testsite")) - b := newTestSitesBuilderFromDepsCfg(t, deps.DepsCfg{Fs: fs, Cfg: cfg}).WithNothingAdded() b.Build(BuildCfg{SkipRender: true}) @@ -1314,7 +1310,7 @@ func TestChompBOM(t *testing.T) { func TestPageWithEmoji(t *testing.T) { for _, enableEmoji := range []bool{true, false} { - v := config.New() + v := config.NewWithTestDefaults() v.Set("enableEmoji", enableEmoji) b := newTestSitesBuilder(t).WithViper(v) |