mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-16 20:53:59 +02:00
@@ -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`)
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user