Make paginate settings configurable per language

Fixes #2449
This commit is contained in:
Bjørn Erik Pedersen
2016-09-15 09:32:52 +02:00
parent bbb11a4a0f
commit b86a605bfb
8 changed files with 32 additions and 11 deletions

View File

@@ -16,6 +16,8 @@ package hugolib
import (
"testing"
"github.com/spf13/hugo/helpers"
"github.com/spf13/viper"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
@@ -31,7 +33,7 @@ func TestLoadGlobalConfig(t *testing.T) {
writeSource(t, "hugo.toml", configContent)
require.NoError(t, LoadGlobalConfig("", "hugo.toml"))
assert.Equal(t, "side", viper.GetString("PaginatePath"))
assert.Equal(t, "side", helpers.Config().GetString("paginatePath"))
// default
assert.Equal(t, "layouts", viper.GetString("LayoutDir"))
}