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/config_test.go | |
parent | 0ada40591216572b0e4c6a8ab986b0aa4fb13c13 (diff) |
all: Refactor to nonglobal file systems
Updates #2701
Fixes #2951
Diffstat (limited to 'hugolib/config_test.go')
-rw-r--r-- | hugolib/config_test.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/hugolib/config_test.go b/hugolib/config_test.go index 6a2325fc9..cbfc71a22 100644 --- a/hugolib/config_test.go +++ b/hugolib/config_test.go @@ -18,6 +18,7 @@ import ( "github.com/spf13/hugo/helpers" + "github.com/spf13/hugo/hugofs" "github.com/spf13/viper" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -30,7 +31,10 @@ func TestLoadGlobalConfig(t *testing.T) { PaginatePath = "side" ` - writeSource(t, "hugo.toml", configContent) + fs := hugofs.NewMem() + viper.SetFs(fs.Source) + + writeSource(t, fs, "hugo.toml", configContent) require.NoError(t, LoadGlobalConfig("", "hugo.toml")) assert.Equal(t, "side", helpers.Config().GetString("paginatePath")) |