mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-20 21:31:32 +02:00
@@ -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"))
|
||||
|
Reference in New Issue
Block a user