mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-20 00:02:16 +08:00
Update binding_test.go
This commit is contained in:
parent
cd06e413fb
commit
3d97125470
@ -645,9 +645,9 @@ func TestValidationDisabled(t *testing.T) {
|
|||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestExistsSucceeds(t *testing.T) {
|
func TestRequiredSucceeds(t *testing.T) {
|
||||||
type HogeStruct struct {
|
type HogeStruct struct {
|
||||||
Hoge *int `json:"hoge" binding:"exists"`
|
Hoge *int `json:"hoge" binding:"required"`
|
||||||
}
|
}
|
||||||
|
|
||||||
var obj HogeStruct
|
var obj HogeStruct
|
||||||
@ -656,9 +656,9 @@ func TestExistsSucceeds(t *testing.T) {
|
|||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestExistsFails(t *testing.T) {
|
func TestRequiredFails(t *testing.T) {
|
||||||
type HogeStruct struct {
|
type HogeStruct struct {
|
||||||
Hoge *int `json:"foo" binding:"exists"`
|
Hoge *int `json:"foo" binding:"required"`
|
||||||
}
|
}
|
||||||
|
|
||||||
var obj HogeStruct
|
var obj HogeStruct
|
||||||
|
Loading…
x
Reference in New Issue
Block a user