Test_Ctx_Drop() — fiber Function Reference
Architecture documentation for the Test_Ctx_Drop() function in ctx_test.go from the fiber codebase.
Entity Profile
Dependency Diagram
graph TD c1373e45_bbf8_7de2_d3bd_f276fa719e28["Test_Ctx_Drop()"] 7b3d4933_5ae3_f84d_ff6d_0cb34e268026["ctx_test.go"] c1373e45_bbf8_7de2_d3bd_f276fa719e28 -->|defined in| 7b3d4933_5ae3_f84d_ff6d_0cb34e268026 style c1373e45_bbf8_7de2_d3bd_f276fa719e28 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
ctx_test.go lines 7965–7991
func Test_Ctx_Drop(t *testing.T) {
t.Parallel()
app := New()
// Handler that calls Drop
app.Get("/block-me", func(c Ctx) error {
return c.Drop()
})
// Additional handler that just calls return
app.Get("/no-response", func(_ Ctx) error {
return nil
})
// Test the Drop method
resp, err := app.Test(httptest.NewRequest(MethodGet, "/block-me", http.NoBody))
require.ErrorIs(t, err, ErrTestGotEmptyResponse)
require.Nil(t, resp)
// Test the no-response handler
resp, err = app.Test(httptest.NewRequest(MethodGet, "/no-response", http.NoBody))
require.NoError(t, err)
require.NotNil(t, resp)
require.Equal(t, StatusOK, resp.StatusCode)
require.Equal(t, "0", resp.Header.Get("Content-Length"))
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does Test_Ctx_Drop() do?
Test_Ctx_Drop() is a function in the fiber codebase, defined in ctx_test.go.
Where is Test_Ctx_Drop() defined?
Test_Ctx_Drop() is defined in ctx_test.go at line 7965.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free