summaryrefslogtreecommitdiffstats
path: root/hugolib/404_test.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2020-01-26 13:14:08 +0100
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2020-01-26 13:14:08 +0100
commit8df5d76e708238563185bac84809b34a4d395734 (patch)
treedd0633336ca4324ddbb0e850761051c16fe354bb /hugolib/404_test.go
parent8ae2c9c3d6861b5b8ef55d119a480360162acfc8 (diff)
Fix 404 with base template regression
Fixes #6795
Diffstat (limited to 'hugolib/404_test.go')
-rw-r--r--hugolib/404_test.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/hugolib/404_test.go b/hugolib/404_test.go
index 5ea98be62..63a766d94 100644
--- a/hugolib/404_test.go
+++ b/hugolib/404_test.go
@@ -30,3 +30,19 @@ func Test404(t *testing.T) {
b.AssertFileContent("public/404.html", "Not Found")
}
+
+func Test404WithBase(t *testing.T) {
+ t.Parallel()
+
+ b := newTestSitesBuilder(t)
+ b.WithSimpleConfigFile().WithTemplatesAdded("404.html", `{{ define "main" }}
+Page not found
+{{ end }}`)
+ 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`)
+
+}