mirror of
https://github.com/labstack/echo.git
synced 2024-11-28 08:38:39 +02:00
[doc] updating testing documentation (#740)
This commit is contained in:
parent
a5b81074e7
commit
5a3fe3f423
@ -98,7 +98,7 @@ func TestCreateUser(t *testing.T) {
|
||||
if assert.NoError(t, err) {
|
||||
req.Header.Set(echo.HeaderContentType, echo.MIMEApplicationJSON)
|
||||
rec := httptest.NewRecorder()
|
||||
c := e.NewContext(standard.NewRequest(req, e.Logger()), standard.NewResponse(rec, e.Logger()))
|
||||
c := e.NewContext(req, rec)
|
||||
h := &handler{mockDB}
|
||||
|
||||
// Assertions
|
||||
@ -114,7 +114,7 @@ func TestGetUser(t *testing.T) {
|
||||
e := echo.New()
|
||||
req := new(http.Request)
|
||||
rec := httptest.NewRecorder()
|
||||
c := e.NewContext(standard.NewRequest(req, e.Logger()), standard.NewResponse(rec, e.Logger()))
|
||||
c := e.NewContext(req, rec)
|
||||
c.SetPath("/users/:email")
|
||||
c.SetParamNames("email")
|
||||
c.SetParamValues("jon@labstack.com")
|
||||
|
Loading…
Reference in New Issue
Block a user