forked from mirror/gin
add TestDisableBindValidation (#2071)
This commit is contained in:
parent
2e5a7196cc
commit
d6eafcf48a
|
@ -40,6 +40,14 @@ func TestSetMode(t *testing.T) {
|
|||
assert.Panics(t, func() { SetMode("unknown") })
|
||||
}
|
||||
|
||||
func TestDisableBindValidation(t *testing.T) {
|
||||
v := binding.Validator
|
||||
assert.NotNil(t, binding.Validator)
|
||||
DisableBindValidation()
|
||||
assert.Nil(t, binding.Validator)
|
||||
binding.Validator = v
|
||||
}
|
||||
|
||||
func TestEnableJsonDecoderUseNumber(t *testing.T) {
|
||||
assert.False(t, binding.EnableDecoderUseNumber)
|
||||
EnableJsonDecoderUseNumber()
|
||||
|
|
Loading…
Reference in New Issue