Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'create/content_test.go')
-rw-r--r--create/content_test.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/create/content_test.go b/create/content_test.go
index aa7ed3fcf..8b6c2c12c 100644
--- a/create/content_test.go
+++ b/create/content_test.go
@@ -52,13 +52,17 @@ func TestNewContent(t *testing.T) {
for _, c := range cases {
cfg, fs := newTestCfg()
+ ps, err := helpers.NewPathSpec(fs, cfg)
+ require.NoError(t, err)
h, err := hugolib.NewHugoSites(deps.DepsCfg{Cfg: cfg, Fs: fs})
require.NoError(t, err)
require.NoError(t, initFs(fs))
- s := h.Sites[0]
+ siteFactory := func(filename string, siteUsed bool) (*hugolib.Site, error) {
+ return h.Sites[0], nil
+ }
- require.NoError(t, create.NewContent(s, c.kind, c.path))
+ require.NoError(t, create.NewContent(ps, siteFactory, c.kind, c.path))
fname := filepath.Join("content", filepath.FromSlash(c.path))
content := readFileFromFs(t, fs.Source, fname)