add test for CanSet

This commit is contained in:
thinkerou 2018-11-02 14:16:49 +08:00
parent 2355ea14fc
commit 06e37a02ba

View File

@ -1229,3 +1229,12 @@ func requestWithBody(method, path, body string) (req *http.Request) {
req, _ = http.NewRequest(method, path, bytes.NewBufferString(body))
return
}
func TestCanSet(t *testing.T) {
type CanSetStruct struct {
lowerStart string `form:"lower"`
}
var c CanSetStruct
assert.Nil(t, mapForm(&c, nil))
}