aboutsummaryrefslogtreecommitdiffhomepage
path: root/helpers/url_test.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2016-11-26 15:50:32 +0100
committerBjørn Erik Pedersen <[email protected]>2016-11-27 14:36:17 +0100
commitc38bfda43bde093aa5f3b3245e3d2de5190d1991 (patch)
tree71d3d6dd02ac7b6eaf2861ff8691c6d98a960e9a /helpers/url_test.go
parent1f6e0de36152f919609518f954fa0c55caad03f4 (diff)
downloadhugo-c38bfda43bde093aa5f3b3245e3d2de5190d1991.tar.gz
hugo-c38bfda43bde093aa5f3b3245e3d2de5190d1991.zip
hugolib: Fix regressions with uglyURLs
Fixes #2734
Diffstat (limited to 'helpers/url_test.go')
-rw-r--r--helpers/url_test.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/helpers/url_test.go b/helpers/url_test.go
index 4072b40e2..8dbec3f7c 100644
--- a/helpers/url_test.go
+++ b/helpers/url_test.go
@@ -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)
}