summaryrefslogtreecommitdiffstats
path: root/hugolib/404_test.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2020-01-27 12:30:31 +0100
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2020-01-27 12:30:31 +0100
commit74b6c4e5ff5ee16f0e6b352a26c1e58b90a25dc6 (patch)
tree22c126aa60bd1cd01eed086df160c8bdd674d2e1 /hugolib/404_test.go
parent8df5d76e708238563185bac84809b34a4d395734 (diff)
And now finally fix the 404 templates
Fixes #6795
Diffstat (limited to 'hugolib/404_test.go')
-rw-r--r--hugolib/404_test.go10
1 files changed, 7 insertions, 3 deletions
diff --git a/hugolib/404_test.go b/hugolib/404_test.go
index 63a766d94..a4dc667aa 100644
--- a/hugolib/404_test.go
+++ b/hugolib/404_test.go
@@ -35,14 +35,18 @@ func Test404WithBase(t *testing.T) {
t.Parallel()
b := newTestSitesBuilder(t)
- b.WithSimpleConfigFile().WithTemplatesAdded("404.html", `{{ define "main" }}
+ b.WithSimpleConfigFile().WithTemplates("404.html", `{{ define "main" }}
Page not found
-{{ end }}`)
+{{ end }}`,
+ "baseof.html", `Base: {{ block "main" . }}{{ end }}`).WithContent("page.md", ``)
+
b.Build(BuildCfg{})
// Note: We currently have only 1 404 page. One might think that we should have
// multiple, to follow the Custom Output scheme, but I don't see how that would work
// right now.
- b.AssertFileContent("public/404.html", `Page not found`)
+ b.AssertFileContent("public/404.html", `
+Base:
+Page not found`)
}