(t *testing.T)
| 11 | ) |
| 12 | |
| 13 | func TestServeWithHandler(t *testing.T) { |
| 14 | handler := func(c *echo.Context) error { |
| 15 | return c.String(http.StatusOK, c.QueryParam("key")) |
| 16 | } |
| 17 | testConf := ContextConfig{ |
| 18 | QueryValues: url.Values{"key": []string{"value"}}, |
| 19 | } |
| 20 | |
| 21 | resp := testConf.ServeWithHandler(t, handler) |
| 22 | |
| 23 | assert.Equal(t, http.StatusOK, resp.Code) |
| 24 | assert.Equal(t, "value", resp.Body.String()) |
| 25 | } |
| 26 | |
| 27 | func TestServeWithHandler_error(t *testing.T) { |
| 28 | handler := func(c *echo.Context) error { |
nothing calls this directly
no test coverage detected
searching dependent graphs…