فهرست منبع

Fix typo on gin_test.go

Fixes #550, change a duplicate assert on the Path of the route by an assert on Handler name associated with the route.
Albin Gilles 10 سال پیش
والد
کامیت
1f2e53dfd1
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      gin_test.go

+ 1 - 1
gin_test.go

@@ -244,7 +244,7 @@ func TestListOfRoutes(t *testing.T) {
 func assertRoutePresent(t *testing.T, gotRoutes RoutesInfo, wantRoute RouteInfo) {
 	for _, gotRoute := range gotRoutes {
 		if gotRoute.Path == wantRoute.Path && gotRoute.Method == wantRoute.Method {
-			assert.Regexp(t, wantRoute.Path, gotRoute.Path)
+			assert.Regexp(t, wantRoute.Handler, gotRoute.Handler)
 			return
 		}
 	}