(t *testing.T)
| 967 | } |
| 968 | |
| 969 | func TestSetFile(t *testing.T) { |
| 970 | filename := "sample-file.txt" |
| 971 | resp := uploadTextFile(t, func(r *Request) { |
| 972 | r.SetFile("file", tests.GetTestFilePath(filename)) |
| 973 | }) |
| 974 | tests.AssertEqual(t, getTestFileContent(t, filename), resp.Bytes()) |
| 975 | |
| 976 | _, err := tc().SetLogger(nil).R().SetFile("file", "file-not-exists.txt").Post("/file-text") |
| 977 | tests.AssertErrorContains(t, err, "no such file") |
| 978 | } |
| 979 | |
| 980 | func TestSetFiles(t *testing.T) { |
| 981 | filename := "sample-file.txt" |
nothing calls this directly
no test coverage detected
searching dependent graphs…