mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-27 22:21:07 +03:00
Fixing all tests to pass with new Viper Config
This commit is contained in:
parent
62dd1d45c1
commit
9a83f7a01b
6 changed files with 37 additions and 31 deletions
|
@ -3,6 +3,8 @@ package hugolib
|
|||
import (
|
||||
"html/template"
|
||||
"testing"
|
||||
|
||||
"github.com/spf13/viper"
|
||||
)
|
||||
|
||||
func TestPermalink(t *testing.T) {
|
||||
|
@ -32,6 +34,7 @@ func TestPermalink(t *testing.T) {
|
|||
}
|
||||
|
||||
for _, test := range tests {
|
||||
viper.Set("uglyurls", test.uglyurls)
|
||||
p := &Page{
|
||||
Node: Node{
|
||||
UrlPath: UrlPath{
|
||||
|
@ -40,9 +43,6 @@ func TestPermalink(t *testing.T) {
|
|||
},
|
||||
Site: SiteInfo{
|
||||
BaseUrl: test.base,
|
||||
Config: &Config{
|
||||
UglyUrls: test.uglyurls,
|
||||
},
|
||||
},
|
||||
},
|
||||
File: File{FileName: test.file, Dir: test.dir, Extension: "html"},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue