aboutsummaryrefslogtreecommitdiffhomepage
path: root/hugolib/alias_test.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2017-02-17 20:52:50 +0100
committerBjørn Erik Pedersen <[email protected]>2017-02-17 20:52:50 +0100
commited847ed93d86d0e1c0993adfee787e7fa02e604b (patch)
treefc85030e7109f3c1f8192bb417cba221f74342fe /hugolib/alias_test.go
parent10c13f5d79e467796088cd305c8c3cb0fa7c0ee0 (diff)
downloadhugo-ed847ed93d86d0e1c0993adfee787e7fa02e604b.tar.gz
hugo-ed847ed93d86d0e1c0993adfee787e7fa02e604b.zip
hugolib: Test helper cleanup
Diffstat (limited to 'hugolib/alias_test.go')
-rw-r--r--hugolib/alias_test.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/hugolib/alias_test.go b/hugolib/alias_test.go
index 653156495..6aa0ca3dd 100644
--- a/hugolib/alias_test.go
+++ b/hugolib/alias_test.go
@@ -36,7 +36,7 @@ func TestAlias(t *testing.T) {
var (
cfg, fs = newTestCfg()
- th = testHelper{cfg}
+ th = testHelper{cfg, fs, t}
)
writeSource(t, fs, filepath.Join("content", "page.md"), pageWithAlias)
@@ -45,9 +45,9 @@ func TestAlias(t *testing.T) {
buildSingleSite(t, deps.DepsCfg{Fs: fs, Cfg: cfg}, BuildCfg{})
// the real page
- th.assertFileContent(t, fs, filepath.Join("public", "page", "index.html"), false, "For some moments the old man")
+ th.assertFileContent(filepath.Join("public", "page", "index.html"), false, "For some moments the old man")
// the alias redirector
- th.assertFileContent(t, fs, filepath.Join("public", "foo", "bar", "index.html"), false, "<meta http-equiv=\"refresh\" content=\"0; ")
+ th.assertFileContent(filepath.Join("public", "foo", "bar", "index.html"), false, "<meta http-equiv=\"refresh\" content=\"0; ")
}
func TestAliasTemplate(t *testing.T) {
@@ -55,7 +55,7 @@ func TestAliasTemplate(t *testing.T) {
var (
cfg, fs = newTestCfg()
- th = testHelper{cfg}
+ th = testHelper{cfg, fs, t}
)
writeSource(t, fs, filepath.Join("content", "page.md"), pageWithAlias)
@@ -69,7 +69,7 @@ func TestAliasTemplate(t *testing.T) {
require.NoError(t, sites.Build(BuildCfg{}))
// the real page
- th.assertFileContent(t, fs, filepath.Join("public", "page", "index.html"), false, "For some moments the old man")
+ th.assertFileContent(filepath.Join("public", "page", "index.html"), false, "For some moments the old man")
// the alias redirector
- th.assertFileContent(t, fs, filepath.Join("public", "foo", "bar", "index.html"), false, "ALIASTEMPLATE")
+ th.assertFileContent(filepath.Join("public", "foo", "bar", "index.html"), false, "ALIASTEMPLATE")
}