feat: add custom 404 page with playful inline artwork and prose

This commit is contained in:
2026-06-26 15:12:10 +02:00
parent 3aa8ce4638
commit 0d31d46fae
4 changed files with 116 additions and 4 deletions

View File

@@ -29,3 +29,26 @@ func TestLoginTemplateShowsCoreCopy(t *testing.T) {
}
}
}
func TestNotFoundTemplateShowsCoreCopy(t *testing.T) {
r, err := ProvideRenderer()
if err != nil {
t.Fatalf("ProvideRenderer: %v", err)
}
var buf bytes.Buffer
if err := r.ExecuteFragment(&buf, "not_found.gohtml", "content", map[string]any{}); err != nil {
t.Fatalf("ExecuteFragment: %v", err)
}
body := buf.String()
for _, want := range []string{
"You got a little lost",
"This page slipped off the map for a minute",
"Head back home",
} {
if !strings.Contains(body, want) {
t.Fatalf("not found template missing %q in output:\n%s", want, body)
}
}
}