mirror of
https://github.com/labstack/echo.git
synced 2026-05-16 09:48:24 +02:00
echo: use HTTP status codes constants where applicable (#1184)
This commit is contained in:
+1
-1
@@ -457,7 +457,7 @@ func request(method, path string, e *Echo) (int, string) {
|
||||
}
|
||||
|
||||
func TestHTTPError(t *testing.T) {
|
||||
err := NewHTTPError(400, map[string]interface{}{
|
||||
err := NewHTTPError(http.StatusBadRequest, map[string]interface{}{
|
||||
"code": 12,
|
||||
})
|
||||
assert.Equal(t, "code=400, message=map[code:12]", err.Error())
|
||||
|
||||
Reference in New Issue
Block a user