mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-19 07:38:57 +08:00
add TestDisableBindValidation
This commit is contained in:
parent
b8b2fada5c
commit
97a5795c08
@ -40,6 +40,12 @@ func TestSetMode(t *testing.T) {
|
||||
assert.Panics(t, func() { SetMode("unknown") })
|
||||
}
|
||||
|
||||
func TestDisableBindValidation(t *testing.T) {
|
||||
assert.NotNil(t, binding.Validator)
|
||||
DisableBindValidation()
|
||||
assert.Nil(t, binding.Validator)
|
||||
}
|
||||
|
||||
func TestEnableJsonDecoderUseNumber(t *testing.T) {
|
||||
assert.False(t, binding.EnableDecoderUseNumber)
|
||||
EnableJsonDecoderUseNumber()
|
||||
|
Loading…
x
Reference in New Issue
Block a user