summaryrefslogtreecommitdiffstats
path: root/cache/filecache/filecache_pruner_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'cache/filecache/filecache_pruner_test.go')
-rw-r--r--cache/filecache/filecache_pruner_test.go11
1 files changed, 2 insertions, 9 deletions
diff --git a/cache/filecache/filecache_pruner_test.go b/cache/filecache/filecache_pruner_test.go
index e62a6315a..72c6781ac 100644
--- a/cache/filecache/filecache_pruner_test.go
+++ b/cache/filecache/filecache_pruner_test.go
@@ -18,9 +18,7 @@ import (
"testing"
"time"
- "github.com/gohugoio/hugo/config"
- "github.com/gohugoio/hugo/helpers"
- "github.com/gohugoio/hugo/hugofs"
+ "github.com/spf13/afero"
"github.com/stretchr/testify/require"
)
@@ -54,14 +52,9 @@ maxAge = "200ms"
dir = ":resourceDir/_gen"
`
- cfg, err := config.FromConfigString(configStr, "toml")
- assert.NoError(err)
-
for _, name := range []string{cacheKeyGetCSV, cacheKeyGetJSON, cacheKeyAssets, cacheKeyImages} {
msg := fmt.Sprintf("cache: %s", name)
- fs := hugofs.NewMem(cfg)
- p, err := helpers.NewPathSpec(fs, cfg)
- assert.NoError(err)
+ p := newPathsSpec(t, afero.NewMemMapFs(), configStr)
caches, err := NewCaches(p)
assert.NoError(err)
cache := caches[name]