(t *testing.T)
| 766 | } |
| 767 | |
| 768 | func TestRequiredSucceeds(t *testing.T) { |
| 769 | type HogeStruct struct { |
| 770 | Hoge *int `json:"hoge" binding:"required"` |
| 771 | } |
| 772 | |
| 773 | var obj HogeStruct |
| 774 | req := requestWithBody(http.MethodPost, "/", `{"hoge": 0}`) |
| 775 | err := JSON.Bind(req, &obj) |
| 776 | require.NoError(t, err) |
| 777 | } |
| 778 | |
| 779 | func TestRequiredFails(t *testing.T) { |
| 780 | type HogeStruct struct { |
nothing calls this directly
no test coverage detected