diff options
Diffstat (limited to 'hugolib/page_permalink_test.go')
-rw-r--r-- | hugolib/page_permalink_test.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/hugolib/page_permalink_test.go b/hugolib/page_permalink_test.go index d185bebab..eb3a6c878 100644 --- a/hugolib/page_permalink_test.go +++ b/hugolib/page_permalink_test.go @@ -18,6 +18,7 @@ import ( "path/filepath" "testing" + "github.com/spf13/hugo/helpers" "github.com/spf13/hugo/source" "github.com/spf13/viper" ) @@ -59,17 +60,18 @@ func TestPermalink(t *testing.T) { } viper.Set("DefaultExtension", "html") - for i, test := range tests { viper.Set("uglyurls", test.uglyURLs) viper.Set("canonifyurls", test.canonifyURLs) + info := newSiteInfo(siteBuilderCfg{baseURL: string(test.base), language: helpers.NewDefaultLanguage()}) + p := &Page{ Node: Node{ URLPath: URLPath{ Section: "z", URL: test.url, }, - Site: newSiteInfoDefaultLanguage(string(test.base)), + Site: &info, }, Source: Source{File: *source.NewFile(filepath.FromSlash(test.file))}, } |