(t *testing.T)
| 99 | } |
| 100 | |
| 101 | func TestToContext_FormValues(t *testing.T) { |
| 102 | testConf := ContextConfig{ |
| 103 | FormValues: url.Values{"key": []string{"value"}}, |
| 104 | } |
| 105 | c := testConf.ToContext(t) |
| 106 | |
| 107 | assert.Equal(t, "value", c.FormValue("key")) |
| 108 | assert.Equal(t, http.MethodPost, c.Request().Method) |
| 109 | assert.Equal(t, echo.MIMEApplicationForm, c.Request().Header.Get(echo.HeaderContentType)) |
| 110 | } |
| 111 | |
| 112 | func TestToContext_MultipartForm(t *testing.T) { |
| 113 | testConf := ContextConfig{ |