Files
cloudpods/pkg/util/multipart/reader_test.go
2019-05-31 11:59:41 +08:00

18 lines
310 B
Go

package multipart
import (
"bytes"
"io"
"strings"
"testing"
)
func TestReader(t *testing.T) {
body := "this is the file body message!!!"
r := NewReader(strings.NewReader(body), "", "test.txt")
var buf bytes.Buffer
io.Copy(&buf, r)
t.Logf("%s", r.FormDataContentType())
t.Logf("%s", buf.String())
}