mirror of https://github.com/gin-gonic/gin.git
test: unit test for Handlers method in RouterGroup interface
This commit is contained in:
parent
1c1da49bb1
commit
05736c6b1b
|
@ -178,6 +178,7 @@ func testRoutesInterface(t *testing.T, r IRoutes) {
|
|||
assert.Equal(t, r, r.Use(handler))
|
||||
|
||||
assert.Equal(t, r, r.Handle(http.MethodGet, "/handler", handler))
|
||||
assert.Equal(t, r, r.Handles([]string{http.MethodGet, http.MethodHead, http.MethodPost}, "/handlers", handler))
|
||||
assert.Equal(t, r, r.Any("/any", handler))
|
||||
assert.Equal(t, r, r.GET("/", handler))
|
||||
assert.Equal(t, r, r.POST("/", handler))
|
||||
|
|
Loading…
Reference in New Issue