Home / Function/ TestEngineHandleMethodNotAllowedCornerCase() — gin Function Reference

TestEngineHandleMethodNotAllowedCornerCase() — gin Function Reference

Architecture documentation for the TestEngineHandleMethodNotAllowedCornerCase() function in routes_test.go from the gin codebase.

Entity Profile

Dependency Diagram

graph TD
  c2a7bf27_f3af_e4d3_761a_912840e837fa["TestEngineHandleMethodNotAllowedCornerCase()"]
  69c2add5_555a_3d82_a4e7_993886631a2c["PerformRequest()"]
  c2a7bf27_f3af_e4d3_761a_912840e837fa -->|calls| 69c2add5_555a_3d82_a4e7_993886631a2c
  style c2a7bf27_f3af_e4d3_761a_912840e837fa fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

routes_test.go lines 774–791

func TestEngineHandleMethodNotAllowedCornerCase(t *testing.T) {
	r := New()
	r.HandleMethodNotAllowed = true

	base := r.Group("base")
	base.GET("/metrics", handlerTest1)

	v1 := base.Group("v1")

	v1.GET("/:id/devices", handlerTest1)
	v1.GET("/user/:id/groups", handlerTest1)

	v1.GET("/orgs/:id", handlerTest1)
	v1.DELETE("/orgs/:id", handlerTest1)

	w := PerformRequest(r, http.MethodGet, "/base/v1/user/groups")
	assert.Equal(t, http.StatusNotFound, w.Code)
}

Domain

Subdomains

Frequently Asked Questions

What does TestEngineHandleMethodNotAllowedCornerCase() do?
TestEngineHandleMethodNotAllowedCornerCase() is a function in the gin codebase.
What does TestEngineHandleMethodNotAllowedCornerCase() call?
TestEngineHandleMethodNotAllowedCornerCase() 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