diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2020-02-21 08:06:38 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2020-02-21 08:14:08 +0100 |
commit | 4c2a0de412a850745ad32e580fcd65575192ca53 (patch) | |
tree | 57f11f13a6d3d5dea2ebfd836acd186cadec979b /hugolib/404_test.go | |
parent | 6be6684cc5f49773bbcdf3e56e4395d0eda47f7b (diff) |
Fix panic in 404.Parent
Fixes #6924
Diffstat (limited to 'hugolib/404_test.go')
-rw-r--r-- | hugolib/404_test.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/hugolib/404_test.go b/hugolib/404_test.go index a4dc667aa..6dea9295c 100644 --- a/hugolib/404_test.go +++ b/hugolib/404_test.go @@ -21,13 +21,16 @@ func Test404(t *testing.T) { t.Parallel() b := newTestSitesBuilder(t) - b.WithSimpleConfigFile().WithTemplatesAdded("404.html", "<html><body>Not Found!</body></html>") + b.WithSimpleConfigFile().WithTemplatesAdded("404.html", "<html><body>Not Found! Parent: {{ .Parent.Kind }}</body></html>") 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", "Not Found") + b.AssertFileContent("public/404.html", ` +Not Found +Parent: home +`) } |