mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-28 14:40:43 +03:00
parent
1f6e0de361
commit
c38bfda43b
9 changed files with 101 additions and 31 deletions
|
@ -248,7 +248,10 @@ func TestURLPrep(t *testing.T) {
|
|||
{true, "/section/name/index.html", "/section/name.html"},
|
||||
}
|
||||
for i, d := range data {
|
||||
output := URLPrep(d.ugly, d.input)
|
||||
viper.Set("uglyURLs", d.ugly)
|
||||
p := NewPathSpecFromConfig(viper.GetViper())
|
||||
|
||||
output := p.URLPrep(d.input)
|
||||
if d.output != output {
|
||||
t.Errorf("Test #%d failed. Expected %q got %q", i, d.output, output)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue