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

Function TestContextResetInHandler

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

Source from the content-addressed store, hash-verified

3052}
3053
3054func TestContextResetInHandler(t *testing.T) {
3055 w := CreateTestResponseRecorder()
3056 c, _ := CreateTestContext(w)
3057
3058 c.handlers = []HandlerFunc{
3059 func(c *Context) { c.reset() },
3060 }
3061 assert.NotPanics(t, func() {
3062 c.Next()
3063 })
3064}
3065
3066func TestRaceParamsContextCopy(t *testing.T) {
3067 DefaultWriter = os.Stdout

Callers

nothing calls this directly

Calls 4

CreateTestContextFunction · 0.85
NextMethod · 0.80
resetMethod · 0.45

Tested by

no test coverage detected