summaryrefslogtreecommitdiffstats
path: root/hugolib/page_permalink_test.go
diff options
context:
space:
mode:
authorspf13 <steve.francia@gmail.com>2014-10-16 20:20:09 -0400
committerspf13 <steve.francia@gmail.com>2014-10-16 20:20:09 -0400
commit5dfc1dedb8ac53b7a2d3823d06808ae86f90b3d9 (patch)
treee90f9cfbcc920685dd9bceecd1925abec81ae0c0 /hugolib/page_permalink_test.go
parent24bbfe7d32fe151487ff87394433622e3f69eee4 (diff)
Big refactor of how source files are used. Also added default destination extension option.
Diffstat (limited to 'hugolib/page_permalink_test.go')
-rw-r--r--hugolib/page_permalink_test.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/hugolib/page_permalink_test.go b/hugolib/page_permalink_test.go
index b20362d5e..f420b19c6 100644
--- a/hugolib/page_permalink_test.go
+++ b/hugolib/page_permalink_test.go
@@ -4,6 +4,7 @@ import (
"html/template"
"testing"
+ "github.com/spf13/hugo/source"
"github.com/spf13/viper"
)
@@ -33,6 +34,8 @@ func TestPermalink(t *testing.T) {
{"x/y/z/boofar.md", "x/y/z", "", "", "/z/y/q/", false, "/z/y/q/", "/z/y/q/"},
}
+ viper.Set("DefaultExtension", "html")
+
for i, test := range tests {
viper.Set("uglyurls", test.uglyurls)
p := &Page{
@@ -45,7 +48,7 @@ func TestPermalink(t *testing.T) {
BaseUrl: test.base,
},
},
- File: File{FileName: test.file, Dir: test.dir, Extension: "html"},
+ Source: Source{File: *source.NewFile(test.file)},
}
if test.slug != "" {