(t *testing.T)
| 424 | } |
| 425 | |
| 426 | func TestBindMultipartForm(t *testing.T) { |
| 427 | bodyBuffer := new(bytes.Buffer) |
| 428 | mw := multipart.NewWriter(bodyBuffer) |
| 429 | mw.WriteField("id", "1") |
| 430 | mw.WriteField("name", "Jon Snow") |
| 431 | mw.Close() |
| 432 | body := bodyBuffer.Bytes() |
| 433 | |
| 434 | testBindOkay(t, bytes.NewReader(body), nil, mw.FormDataContentType()) |
| 435 | testBindOkay(t, bytes.NewReader(body), dummyQuery, mw.FormDataContentType()) |
| 436 | } |
| 437 | |
| 438 | func TestBindUnsupportedMediaType(t *testing.T) { |
| 439 | testBindError(t, strings.NewReader(invalidContent), MIMEApplicationJSON, &json.SyntaxError{}) |
nothing calls this directly
no test coverage detected
searching dependent graphs…