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

Function Mock_Ctx

pine_test.go:11–22  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

9)
10
11func Mock_Ctx() *Ctx {
12 ctx := Ctx{
13 params: map[string]string{"id": "42"},
14 }
15 ctx.Request = httptest.NewRequest(http.MethodGet, "/?query=queryValue", nil)
16 ctx.Response = &responseWriterWrapper{
17 httptest.NewRecorder(),
18 0,
19 nil,
20 }
21 return &ctx
22}
23func TestNewServer_DefaultConfig(t *testing.T) {
24 server := New()
25

Callers 4

TestBindParam_SuccessFunction · 0.85
TestBindParam_NotFoundFunction · 0.85
TestBindQuery_SuccessFunction · 0.85
TestBindQuery_NotFoundFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected