(t *testing.T)
| 224 | } |
| 225 | |
| 226 | func 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 | |
| 239 | func TestBindQueryParams(t *testing.T) { |
| 240 | e := New() |
nothing calls this directly
no test coverage detected
searching dependent graphs…