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

Function TestContextHandler

context_test.go:719–724  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

717}
718
719func TestContextHandler(t *testing.T) {
720 c, _ := CreateTestContext(httptest.NewRecorder())
721 c.handlers = HandlersChain{func(c *Context) {}, handlerTest}
722
723 assert.Equal(t, reflect.ValueOf(handlerTest).Pointer(), reflect.ValueOf(c.Handler()).Pointer())
724}
725
726func TestContextQuery(t *testing.T) {
727 c, _ := CreateTestContext(httptest.NewRecorder())

Callers

nothing calls this directly

Calls 2

CreateTestContextFunction · 0.85
HandlerMethod · 0.45

Tested by

no test coverage detected