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.
This commit is contained in:
Albin Gilles 2016-03-09 08:29:01 +01:00
parent 31e4401f01
commit 1f2e53dfd1

View File

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