1
0
mirror of https://github.com/labstack/echo.git synced 2025-07-15 01:34:53 +02:00

Using httptest

Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
Vishal Rana
2017-05-13 15:44:27 -07:00
parent 8f5fb6395a
commit cb9255e775
8 changed files with 15 additions and 16 deletions

View File

@ -43,7 +43,7 @@ func TestLogger(t *testing.T) {
h(c)
// Status 5xx with empty path
req, _ = http.NewRequest(echo.GET, "/", nil)
req = httptest.NewRequest(echo.GET, "/", nil)
rec = httptest.NewRecorder()
c = e.NewContext(req, rec)
h = Logger()(func(c echo.Context) error {