rename
This commit is contained in:
+9
-9
@@ -493,27 +493,27 @@ func TestListOfRoutes(t *testing.T) {
|
||||
assertRoutePresent(t, list, RouteInfo{
|
||||
Method: "GET",
|
||||
Path: "/favicon.ico",
|
||||
Handler: "^(.*/vendor/)?github.com/gin-gonic/gin.handlerTest1$",
|
||||
Handler: "^(.*/vendor/)?git.company.lan/gopkg/gin.handlerTest1$",
|
||||
})
|
||||
assertRoutePresent(t, list, RouteInfo{
|
||||
Method: "GET",
|
||||
Path: "/",
|
||||
Handler: "^(.*/vendor/)?github.com/gin-gonic/gin.handlerTest1$",
|
||||
Handler: "^(.*/vendor/)?git.company.lan/gopkg/gin.handlerTest1$",
|
||||
})
|
||||
assertRoutePresent(t, list, RouteInfo{
|
||||
Method: "GET",
|
||||
Path: "/users/",
|
||||
Handler: "^(.*/vendor/)?github.com/gin-gonic/gin.handlerTest2$",
|
||||
Handler: "^(.*/vendor/)?git.company.lan/gopkg/gin.handlerTest2$",
|
||||
})
|
||||
assertRoutePresent(t, list, RouteInfo{
|
||||
Method: "GET",
|
||||
Path: "/users/:id",
|
||||
Handler: "^(.*/vendor/)?github.com/gin-gonic/gin.handlerTest1$",
|
||||
Handler: "^(.*/vendor/)?git.company.lan/gopkg/gin.handlerTest1$",
|
||||
})
|
||||
assertRoutePresent(t, list, RouteInfo{
|
||||
Method: "POST",
|
||||
Path: "/users/:id",
|
||||
Handler: "^(.*/vendor/)?github.com/gin-gonic/gin.handlerTest2$",
|
||||
Handler: "^(.*/vendor/)?git.company.lan/gopkg/gin.handlerTest2$",
|
||||
})
|
||||
}
|
||||
|
||||
@@ -710,8 +710,8 @@ func TestNewOptionFunc(t *testing.T) {
|
||||
r := New(fc)
|
||||
|
||||
routes := r.Routes()
|
||||
assertRoutePresent(t, routes, RouteInfo{Path: "/test1", Method: "GET", Handler: "github.com/gin-gonic/gin.handlerTest1"})
|
||||
assertRoutePresent(t, routes, RouteInfo{Path: "/test2", Method: "GET", Handler: "github.com/gin-gonic/gin.handlerTest2"})
|
||||
assertRoutePresent(t, routes, RouteInfo{Path: "/test1", Method: "GET", Handler: "git.company.lan/gopkg/gin.handlerTest1"})
|
||||
assertRoutePresent(t, routes, RouteInfo{Path: "/test2", Method: "GET", Handler: "git.company.lan/gopkg/gin.handlerTest2"})
|
||||
}
|
||||
|
||||
func TestWithOptionFunc(t *testing.T) {
|
||||
@@ -727,6 +727,6 @@ func TestWithOptionFunc(t *testing.T) {
|
||||
})
|
||||
|
||||
routes := r.Routes()
|
||||
assertRoutePresent(t, routes, RouteInfo{Path: "/test1", Method: "GET", Handler: "github.com/gin-gonic/gin.handlerTest1"})
|
||||
assertRoutePresent(t, routes, RouteInfo{Path: "/test2", Method: "GET", Handler: "github.com/gin-gonic/gin.handlerTest2"})
|
||||
assertRoutePresent(t, routes, RouteInfo{Path: "/test1", Method: "GET", Handler: "git.company.lan/gopkg/gin.handlerTest1"})
|
||||
assertRoutePresent(t, routes, RouteInfo{Path: "/test2", Method: "GET", Handler: "git.company.lan/gopkg/gin.handlerTest2"})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user