diff options
Diffstat (limited to 'source/filesystem_test.go')
-rw-r--r-- | source/filesystem_test.go | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/source/filesystem_test.go b/source/filesystem_test.go index 82f02d404..ee86c1487 100644 --- a/source/filesystem_test.go +++ b/source/filesystem_test.go @@ -19,7 +19,6 @@ import ( "testing" "github.com/gohugoio/hugo/helpers" - "github.com/gohugoio/hugo/hugofs" "github.com/spf13/viper" @@ -69,9 +68,19 @@ func TestUnicodeNorm(t *testing.T) { } -func newTestSourceSpec() SourceSpec { +func newTestConfig() *viper.Viper { v := viper.New() v.Set("contentDir", "content") - ps, _ := helpers.NewPathSpec(hugofs.NewMem(v), v) - return SourceSpec{Fs: hugofs.NewMem(v).Source, PathSpec: ps} + v.Set("dataDir", "data") + v.Set("i18nDir", "i18n") + v.Set("layoutDir", "layouts") + v.Set("archetypeDir", "archetypes") + return v +} + +func newTestSourceSpec() *SourceSpec { + v := newTestConfig() + fs := hugofs.NewMem(v) + ps, _ := helpers.NewPathSpec(fs, v) + return NewSourceSpec(ps, fs.Source) } |