MCPcopy
hub / github.com/gin-gonic/gin / TestBindingJSONNilBody

Function TestBindingJSONNilBody

binding/binding_test.go:181–186  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

179}
180
181func TestBindingJSONNilBody(t *testing.T) {
182 var obj FooStruct
183 req, _ := http.NewRequest(http.MethodPost, "/", nil)
184 err := JSON.Bind(req, &obj)
185 require.Error(t, err)
186}
187
188func TestBindingJSON(t *testing.T) {
189 testBodyBinding(t,

Callers

nothing calls this directly

Calls 2

BindMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected