Merge pull request 'Improve display of 404/500 error pages' (#2466) from 0ko/forgejo:errorcodes into forgejo

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2466
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
This commit is contained in:
Earl Warren 2024-02-25 15:53:09 +00:00
commit f991f107da
7 changed files with 16 additions and 5 deletions

View file

@ -33,7 +33,7 @@ func TestCompareTag(t *testing.T) {
req = NewRequest(t, "GET", "/user2/repo1/compare/invalid")
resp = session.MakeRequest(t, req, http.StatusNotFound)
assert.False(t, strings.Contains(resp.Body.String(), "/assets/img/500.png"), "expect 404 page not 500")
assert.False(t, strings.Contains(resp.Body.String(), ">500<"), "expect 404 page not 500")
}
// Compare with inferred default branch (master)

View file

@ -36,8 +36,6 @@ func TestLinksNoLogin(t *testing.T) {
"/user2/repo1/",
"/user2/repo1/projects",
"/user2/repo1/projects/1",
"/assets/img/404.png",
"/assets/img/500.png",
"/.well-known/security.txt",
}