Test_CSRF_FromContextMethods() — fiber Function Reference
Architecture documentation for the Test_CSRF_FromContextMethods() function in csrf_test.go from the fiber codebase.
Entity Profile
Dependency Diagram
graph TD fbbcc652_9dd6_6a0b_db94_5f4f0c0c10cb["Test_CSRF_FromContextMethods()"] 306a0c68_f5a5_b368_f37a_1419425a8fea["csrf_test.go"] fbbcc652_9dd6_6a0b_db94_5f4f0c0c10cb -->|defined in| 306a0c68_f5a5_b368_f37a_1419425a8fea style fbbcc652_9dd6_6a0b_db94_5f4f0c0c10cb fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
middleware/csrf/csrf_test.go lines 1996–2015
func Test_CSRF_FromContextMethods(t *testing.T) {
t.Parallel()
app := fiber.New()
app.Use(New())
app.Get("/", func(c fiber.Ctx) error {
token := TokenFromContext(c)
require.NotEmpty(t, token)
handler := HandlerFromContext(c)
require.NotNil(t, handler)
return c.SendStatus(fiber.StatusOK)
})
resp, err := app.Test(httptest.NewRequest(fiber.MethodGet, "/", http.NoBody))
require.NoError(t, err)
require.Equal(t, fiber.StatusOK, resp.StatusCode)
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does Test_CSRF_FromContextMethods() do?
Test_CSRF_FromContextMethods() is a function in the fiber codebase, defined in middleware/csrf/csrf_test.go.
Where is Test_CSRF_FromContextMethods() defined?
Test_CSRF_FromContextMethods() is defined in middleware/csrf/csrf_test.go at line 1996.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free