mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-23 04:39:28 +02:00
chore(tests): fix testing failure caused by dep update (#7376)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7376 Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
This commit is contained in:
parent
fed2d81c44
commit
49ea851da9
1 changed files with 3 additions and 3 deletions
|
@ -28,7 +28,7 @@ func TestDevtestErrorpages(t *testing.T) {
|
||||||
req := NewRequest(t, "GET", "/devtest/error/500")
|
req := NewRequest(t, "GET", "/devtest/error/500")
|
||||||
resp := MakeRequest(t, req, http.StatusInternalServerError)
|
resp := MakeRequest(t, req, http.StatusInternalServerError)
|
||||||
doc := NewHTMLParser(t, resp.Body)
|
doc := NewHTMLParser(t, resp.Body)
|
||||||
assert.EqualValues(t, "500", doc.Find(".error-code").Text())
|
assert.Equal(t, "500", doc.Find(".error-code").Text())
|
||||||
assert.Contains(t, doc.Find("head title").Text(), "Internal server error")
|
assert.Contains(t, doc.Find("head title").Text(), "Internal server error")
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ func TestDevtestErrorpages(t *testing.T) {
|
||||||
SetHeader("Accept", "text/html")
|
SetHeader("Accept", "text/html")
|
||||||
resp := MakeRequest(t, req, http.StatusNotFound)
|
resp := MakeRequest(t, req, http.StatusNotFound)
|
||||||
doc := NewHTMLParser(t, resp.Body)
|
doc := NewHTMLParser(t, resp.Body)
|
||||||
assert.EqualValues(t, "404", doc.Find(".error-code").Text())
|
assert.Equal(t, "404", doc.Find(".error-code").Text())
|
||||||
assert.Contains(t, doc.Find("head title").Text(), "Page not found")
|
assert.Contains(t, doc.Find("head title").Text(), "Page not found")
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -48,6 +48,6 @@ func TestDevtestErrorpages(t *testing.T) {
|
||||||
req := NewRequest(t, "GET", "/devtest/error/413")
|
req := NewRequest(t, "GET", "/devtest/error/413")
|
||||||
resp := MakeRequest(t, req, http.StatusRequestEntityTooLarge)
|
resp := MakeRequest(t, req, http.StatusRequestEntityTooLarge)
|
||||||
doc := NewHTMLParser(t, resp.Body)
|
doc := NewHTMLParser(t, resp.Body)
|
||||||
assert.EqualValues(t, "413", doc.Find(".error-code").Text())
|
assert.Equal(t, "413", doc.Find(".error-code").Text())
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue