(t *testing.T)
| 748 | } |
| 749 | |
| 750 | func TestValidationFails(t *testing.T) { |
| 751 | var obj FooStruct |
| 752 | req := requestWithBody(http.MethodPost, "/", `{"bar": "foo"}`) |
| 753 | err := JSON.Bind(req, &obj) |
| 754 | require.Error(t, err) |
| 755 | } |
| 756 | |
| 757 | func TestValidationDisabled(t *testing.T) { |
| 758 | backup := Validator |
nothing calls this directly
no test coverage detected