0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-23 07:43:18 -05:00

Include HTTP method in test error message (#2815)

This commit is contained in:
Ethan Koenig 2017-10-31 22:54:24 -07:00 committed by Bo-Yi Wu
parent e6a97b6675
commit 1b6a962e70

View file

@ -284,7 +284,7 @@ func MakeRequest(t testing.TB, req *http.Request, expectedStatus int) *TestRespo
mac.ServeHTTP(respWriter, req) mac.ServeHTTP(respWriter, req)
if expectedStatus != NoExpectedStatus { if expectedStatus != NoExpectedStatus {
assert.EqualValues(t, expectedStatus, respWriter.HeaderCode, assert.EqualValues(t, expectedStatus, respWriter.HeaderCode,
"Request URL: %s", req.URL.String()) "Request: %s %s", req.Method, req.URL.String())
} }
return &TestResponse{ return &TestResponse{
HeaderCode: respWriter.HeaderCode, HeaderCode: respWriter.HeaderCode,