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

Function assertRoutePresent

gin_test.go:908–916  ·  view source on GitHub ↗
(t *testing.T, gotRoutes RoutesInfo, wantRoute RouteInfo)

Source from the content-addressed store, hash-verified

906}
907
908func assertRoutePresent(t *testing.T, gotRoutes RoutesInfo, wantRoute RouteInfo) {
909 for _, gotRoute := range gotRoutes {
910 if gotRoute.Path == wantRoute.Path && gotRoute.Method == wantRoute.Method {
911 assert.Regexp(t, wantRoute.Handler, gotRoute.Handler)
912 return
913 }
914 }
915 t.Errorf("route not found: %v", wantRoute)
916}
917
918func handlerTest1(c *Context) {}
919func handlerTest2(c *Context) {}

Callers 3

TestListOfRoutesFunction · 0.85
TestNewOptionFuncFunction · 0.85
TestWithOptionFuncFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected