MCPcopy Index your code
hub / github.com/labstack/echo / TestBindForm

Function TestBindForm

bind_test.go:226–237  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

224}
225
226func TestBindForm(t *testing.T) {
227
228 testBindOkay(t, strings.NewReader(userForm), nil, MIMEApplicationForm)
229 testBindOkay(t, strings.NewReader(userForm), dummyQuery, MIMEApplicationForm)
230 e := New()
231 req := httptest.NewRequest(http.MethodPost, "/", strings.NewReader(userForm))
232 rec := httptest.NewRecorder()
233 c := e.NewContext(req, rec)
234 req.Header.Set(HeaderContentType, MIMEApplicationForm)
235 err := c.Bind(&[]struct{ Field string }{})
236 assert.Error(t, err)
237}
238
239func TestBindQueryParams(t *testing.T) {
240 e := New()

Callers

nothing calls this directly

Calls 6

BindMethod · 0.95
testBindOkayFunction · 0.85
NewFunction · 0.85
NewContextMethod · 0.80
SetMethod · 0.80
ErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…