diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2017-02-05 06:20:06 +0300 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2017-02-17 19:15:26 +0300 |
commit | 93ca7c9e958e34469a337e4efcc7c75774ec50fd (patch) | |
tree | 5dfa296cfe74fd5ef8f0d41ea4078704f453aa04 /hugolib/siteJSONEncode_test.go | |
parent | e34af6ee30f70f5780a281e2fd8f4ed9b487ee61 (diff) |
all: Refactor to nonglobal Viper, i18n etc.
This is a final rewrite that removes all the global state in Hugo, which also enables
the use if `t.Parallel` in tests.
Updates #2701
Fixes #3016
Diffstat (limited to 'hugolib/siteJSONEncode_test.go')
-rw-r--r-- | hugolib/siteJSONEncode_test.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/hugolib/siteJSONEncode_test.go b/hugolib/siteJSONEncode_test.go index 1218bfd34..4b01a9144 100644 --- a/hugolib/siteJSONEncode_test.go +++ b/hugolib/siteJSONEncode_test.go @@ -20,15 +20,14 @@ import ( "path/filepath" "github.com/spf13/hugo/deps" - "github.com/spf13/hugo/hugofs" ) // Issue #1123 // Testing prevention of cyclic refs in JSON encoding // May be smart to run with: -timeout 4000ms func TestEncodePage(t *testing.T) { - - fs := hugofs.NewMem() + t.Parallel() + cfg, fs := newTestCfg() // borrowed from menu_test.go for _, src := range menuPageSources { @@ -36,7 +35,7 @@ func TestEncodePage(t *testing.T) { } - s := buildSingleSite(t, deps.DepsCfg{Fs: fs}, BuildCfg{}) + s := buildSingleSite(t, deps.DepsCfg{Fs: fs, Cfg: cfg}, BuildCfg{}) _, err := json.Marshal(s) check(t, err) |