mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-22 17:42:14 +08:00
add coverage
This commit is contained in:
parent
eb8befa8c3
commit
0c5519c4f8
@ -657,6 +657,13 @@ func TestUriBinding(t *testing.T) {
|
|||||||
m["name"] = []string{"thinkerou"}
|
m["name"] = []string{"thinkerou"}
|
||||||
assert.NoError(t, b.BindUri(m, &tag))
|
assert.NoError(t, b.BindUri(m, &tag))
|
||||||
assert.Equal(t, "thinkerou", tag.Name)
|
assert.Equal(t, "thinkerou", tag.Name)
|
||||||
|
|
||||||
|
type NotSupportStruct struct {
|
||||||
|
Name map[string]interface{} `uri:"name"`
|
||||||
|
}
|
||||||
|
var not NotSupportStruct
|
||||||
|
assert.Error(t, b.BindUri(m, ¬))
|
||||||
|
assert.Equal(t, "", not.Name)
|
||||||
}
|
}
|
||||||
|
|
||||||
func testFormBinding(t *testing.T, method, path, badPath, body, badBody string) {
|
func testFormBinding(t *testing.T, method, path, badPath, body, badBody string) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user