mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-22 17:42:14 +08:00
add test for CanSet
This commit is contained in:
parent
2355ea14fc
commit
06e37a02ba
@ -1229,3 +1229,12 @@ func requestWithBody(method, path, body string) (req *http.Request) {
|
|||||||
req, _ = http.NewRequest(method, path, bytes.NewBufferString(body))
|
req, _ = http.NewRequest(method, path, bytes.NewBufferString(body))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestCanSet(t *testing.T) {
|
||||||
|
type CanSetStruct struct {
|
||||||
|
lowerStart string `form:"lower"`
|
||||||
|
}
|
||||||
|
|
||||||
|
var c CanSetStruct
|
||||||
|
assert.Nil(t, mapForm(&c, nil))
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user