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

Function TestBindQuery_Success

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

Source from the content-addressed store, hash-verified

68}
69
70func TestBindQuery_Success(t *testing.T) {
71 ctx := Mock_Ctx()
72
73 var value string
74 err := ctx.BindQuery("query", &value)
75 if err != nil {
76 t.Fatalf("expected no error, got %v", err)
77 }
78 if value != "queryValue" {
79 t.Fatalf("expected query value to be 'queryValue', got '%s'", value)
80 }
81}
82
83func TestBindQuery_NotFound(t *testing.T) {
84 ctx := Mock_Ctx()

Callers

nothing calls this directly

Calls 2

Mock_CtxFunction · 0.85
BindQueryMethod · 0.80

Tested by

no test coverage detected