(t *testing.T)
| 755 | } |
| 756 | |
| 757 | func TestValidationDisabled(t *testing.T) { |
| 758 | backup := Validator |
| 759 | Validator = nil |
| 760 | defer func() { Validator = backup }() |
| 761 | |
| 762 | var obj FooStruct |
| 763 | req := requestWithBody(http.MethodPost, "/", `{"bar": "foo"}`) |
| 764 | err := JSON.Bind(req, &obj) |
| 765 | require.NoError(t, err) |
| 766 | } |
| 767 | |
| 768 | func TestRequiredSucceeds(t *testing.T) { |
| 769 | type HogeStruct struct { |
nothing calls this directly
no test coverage detected