summaryrefslogtreecommitdiffstats
path: root/hugolib/site_test.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2017-02-17 20:52:50 +0100
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2017-02-17 20:52:50 +0100
commited847ed93d86d0e1c0993adfee787e7fa02e604b (patch)
treefc85030e7109f3c1f8192bb417cba221f74342fe /hugolib/site_test.go
parent10c13f5d79e467796088cd305c8c3cb0fa7c0ee0 (diff)
hugolib: Test helper cleanup
Diffstat (limited to 'hugolib/site_test.go')
-rw-r--r--hugolib/site_test.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/hugolib/site_test.go b/hugolib/site_test.go
index 8418e2a8c..be9028543 100644
--- a/hugolib/site_test.go
+++ b/hugolib/site_test.go
@@ -263,7 +263,7 @@ THE END.`, refShortcode)),
t.Fatalf("Expected 3 got %d pages", len(s.AllPages))
}
- th := testHelper{s.Cfg}
+ th := testHelper{s.Cfg, s.Fs, t}
tests := []struct {
doc string
@@ -275,7 +275,7 @@ THE END.`, refShortcode)),
}
for _, test := range tests {
- th.assertFileContent(t, fs, test.doc, true, test.expected)
+ th.assertFileContent(test.doc, true, test.expected)
}
@@ -409,7 +409,7 @@ func doTestSectionNaming(t *testing.T, canonify, uglify, pluralize bool) {
writeSource(t, fs, filepath.Join("layouts", "_default/list.html"), "{{.Title}}")
s := buildSingleSite(t, deps.DepsCfg{Fs: fs, Cfg: cfg}, BuildCfg{})
- th := testHelper{s.Cfg}
+ th := testHelper{s.Cfg, s.Fs, t}
tests := []struct {
doc string
pluralAware bool
@@ -429,7 +429,7 @@ func doTestSectionNaming(t *testing.T, canonify, uglify, pluralize bool) {
test.expected = inflect.Pluralize(test.expected)
}
- th.assertFileContent(t, fs, filepath.Join("public", test.doc), true, test.expected)
+ th.assertFileContent(filepath.Join("public", test.doc), true, test.expected)
}
}
@@ -521,7 +521,7 @@ func TestAbsURLify(t *testing.T) {
writeSource(t, fs, filepath.Join("layouts", "blue/single.html"), templateWithURLAbs)
s := buildSingleSite(t, deps.DepsCfg{Fs: fs, Cfg: cfg}, BuildCfg{})
- th := testHelper{s.Cfg}
+ th := testHelper{s.Cfg, s.Fs, t}
tests := []struct {
file, expected string
@@ -542,7 +542,7 @@ func TestAbsURLify(t *testing.T) {
expected = strings.Replace(expected, baseURL, "", -1)
}
- th.assertFileContent(t, fs, test.file, true, expected)
+ th.assertFileContent(test.file, true, expected)
}
}