MCPcopy Create free account
hub / github.com/BryanMwangi/pine / TestBindQuery_NotFound

Function TestBindQuery_NotFound

bind_test.go:83–91  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

81}
82
83func TestBindQuery_NotFound(t *testing.T) {
84 ctx := Mock_Ctx()
85
86 var value string
87 err := ctx.BindQuery("missing", &value)
88 if !errors.Is(err, ErrValidation) {
89 t.Fatalf("expected ErrValidation, got %v", err)
90 }
91}
92
93func TestBindJSON_RequiredTag_MissingField_ReturnsError(t *testing.T) {
94 // fieldOne is required but absent from the body — must error.

Callers

nothing calls this directly

Calls 2

Mock_CtxFunction · 0.85
BindQueryMethod · 0.80

Tested by

no test coverage detected