(t *testing.T)
| 530 | } |
| 531 | |
| 532 | func TestSetMultipartBoundaryFunc(t *testing.T) { |
| 533 | delimiter := "test-delimiter" |
| 534 | expectedContentType := fmt.Sprintf("multipart/form-data; boundary=%s", delimiter) |
| 535 | resp, err := tc(). |
| 536 | SetMultipartBoundaryFunc(func() string { |
| 537 | return delimiter |
| 538 | }).R(). |
| 539 | EnableForceMultipart(). |
| 540 | SetFormData( |
| 541 | map[string]string{ |
| 542 | "test": "test", |
| 543 | }). |
| 544 | Post("/content-type") |
| 545 | assertSuccess(t, resp, err) |
| 546 | tests.AssertEqual(t, expectedContentType, resp.String()) |
| 547 | } |
| 548 | |
| 549 | func TestFirefoxMultipartBoundaryFunc(t *testing.T) { |
| 550 | r := regexp.MustCompile(`^-------------------------\d{1,10}\d{1,10}\d{1,10}$`) |
nothing calls this directly
no test coverage detected
searching dependent graphs…