diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2017-01-10 10:55:03 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2017-02-04 11:37:25 +0700 |
commit | c71e1b106e6011d148cac899f83c4685dee33a22 (patch) | |
tree | c5c7090f0c2398c7771e4908ebcc97aa7714ffd2 /hugolib/siteJSONEncode_test.go | |
parent | 0ada40591216572b0e4c6a8ab986b0aa4fb13c13 (diff) |
all: Refactor to nonglobal file systems
Updates #2701
Fixes #2951
Diffstat (limited to 'hugolib/siteJSONEncode_test.go')
-rw-r--r-- | hugolib/siteJSONEncode_test.go | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/hugolib/siteJSONEncode_test.go b/hugolib/siteJSONEncode_test.go index 170db4b4d..1218bfd34 100644 --- a/hugolib/siteJSONEncode_test.go +++ b/hugolib/siteJSONEncode_test.go @@ -16,6 +16,11 @@ package hugolib import ( "encoding/json" "testing" + + "path/filepath" + + "github.com/spf13/hugo/deps" + "github.com/spf13/hugo/hugofs" ) // Issue #1123 @@ -23,9 +28,15 @@ import ( // May be smart to run with: -timeout 4000ms func TestEncodePage(t *testing.T) { + fs := hugofs.NewMem() + // borrowed from menu_test.go - s := createTestSite(menuPageSources) - testSiteSetup(s, t) + for _, src := range menuPageSources { + writeSource(t, fs, filepath.Join("content", src.Name), string(src.Content)) + + } + + s := buildSingleSite(t, deps.DepsCfg{Fs: fs}, BuildCfg{}) _, err := json.Marshal(s) check(t, err) |