TestRouteNotAllowedEnabled3() — gin Function Reference
Architecture documentation for the TestRouteNotAllowedEnabled3() function in routes_test.go from the gin codebase.
Entity Profile
Dependency Diagram
graph TD 6b9f5c52_f8d5_90de_738e_821f8a8e37d7["TestRouteNotAllowedEnabled3()"] 69c2add5_555a_3d82_a4e7_993886631a2c["PerformRequest()"] 6b9f5c52_f8d5_90de_738e_821f8a8e37d7 -->|calls| 69c2add5_555a_3d82_a4e7_993886631a2c style 6b9f5c52_f8d5_90de_738e_821f8a8e37d7 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
routes_test.go lines 518–528
func TestRouteNotAllowedEnabled3(t *testing.T) {
router := New()
router.HandleMethodNotAllowed = true
router.GET("/path", func(c *Context) {})
router.POST("/path", func(c *Context) {})
w := PerformRequest(router, http.MethodPut, "/path")
assert.Equal(t, http.StatusMethodNotAllowed, w.Code)
allowed := w.Header().Get("Allow")
assert.Contains(t, allowed, http.MethodGet)
assert.Contains(t, allowed, http.MethodPost)
}
Domain
Subdomains
Calls
Source
Frequently Asked Questions
What does TestRouteNotAllowedEnabled3() do?
TestRouteNotAllowedEnabled3() is a function in the gin codebase.
What does TestRouteNotAllowedEnabled3() call?
TestRouteNotAllowedEnabled3() calls 1 function(s): PerformRequest.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free