feat: add custom 404 page with playful inline artwork and prose
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user