summaryrefslogtreecommitdiffstats
path: root/tpl/strings/init_test.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2017-07-30 17:46:04 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2017-07-31 22:16:46 +0200
commit8fb594bfb090c017d4e5cbb2905780221e202c41 (patch)
treef622b6aa90757827ea8f07cc27be692fb37b76c4 /tpl/strings/init_test.go
parent9b4170ce768717adfbe9d97c46e38ceaec2ce994 (diff)
Make the title case style guide configurable
This works for the `title` func and the other places where Hugo makes title case. * AP style (new default) * Chicago style * Go style (what we have today) Fixes #989
Diffstat (limited to 'tpl/strings/init_test.go')
-rw-r--r--tpl/strings/init_test.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/tpl/strings/init_test.go b/tpl/strings/init_test.go
index a8ad8ffdf..904e486f7 100644
--- a/tpl/strings/init_test.go
+++ b/tpl/strings/init_test.go
@@ -18,6 +18,7 @@ import (
"github.com/gohugoio/hugo/deps"
"github.com/gohugoio/hugo/tpl/internal"
+ "github.com/spf13/viper"
"github.com/stretchr/testify/require"
)
@@ -26,7 +27,7 @@ func TestInit(t *testing.T) {
var ns *internal.TemplateFuncsNamespace
for _, nsf := range internal.TemplateFuncsNamespaceRegistry {
- ns = nsf(&deps.Deps{})
+ ns = nsf(&deps.Deps{Cfg: viper.New()})
if ns.Name == name {
found = true
break