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

Function TestNoMethod

ginS/gins_test.go:183–191  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

181}
182
183func TestNoMethod(t *testing.T) {
184 NoMethod(func(c *gin.Context) {
185 c.String(http.StatusMethodNotAllowed, "method not allowed")
186 })
187
188 // This just verifies that NoMethod is callable
189 // Testing the actual behavior would require a separate engine instance
190 assert.NotNil(t, engine())
191}
192
193func TestRoutes(t *testing.T) {
194 GET("/routes-test", func(c *gin.Context) {})

Callers

nothing calls this directly

Calls 2

NoMethodFunction · 0.85
StringMethod · 0.65

Tested by

no test coverage detected