MCPcopy
hub / github.com/labstack/echo / TestToContext_FormValues

Function TestToContext_FormValues

echotest/context_test.go:101–110  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

99}
100
101func 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
112func TestToContext_MultipartForm(t *testing.T) {
113 testConf := ContextConfig{

Callers

nothing calls this directly

Calls 4

ToContextMethod · 0.95
FormValueMethod · 0.80
RequestMethod · 0.80
GetMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…