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

Function TestContextIsAborted

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

Source from the content-addressed store, hash-verified

1799}
1800
1801func TestContextIsAborted(t *testing.T) {
1802 c, _ := CreateTestContext(httptest.NewRecorder())
1803 assert.False(t, c.IsAborted())
1804
1805 c.Abort()
1806 assert.True(t, c.IsAborted())
1807
1808 c.Next()
1809 assert.True(t, c.IsAborted())
1810
1811 c.index++
1812 assert.True(t, c.IsAborted())
1813}
1814
1815// TestContextAbortWithStatus tests that the response can be written from `bytestring`
1816// with specified MIME type

Callers

nothing calls this directly

Calls 4

CreateTestContextFunction · 0.85
IsAbortedMethod · 0.80
AbortMethod · 0.80
NextMethod · 0.80

Tested by

no test coverage detected