1
0
mirror of https://github.com/labstack/echo.git synced 2024-12-24 20:14:31 +02:00

fix routes test failure.

This commit is contained in:
Oleg Lobanov 2016-06-01 16:35:59 +04:00
parent 7fee34fade
commit 91d1f199cb

View File

@ -236,9 +236,17 @@ func TestEchoRoutes(t *testing.T) {
})
}
for i, r := range e.Routes() {
assert.Equal(t, routes[i].Method, r.Method)
assert.Equal(t, routes[i].Path, r.Path)
for _, r := range e.Routes() {
found := false
for _, rr := range routes {
if r.Method == rr.Method && r.Path == rr.Path {
found = true
break
}
}
if !found {
t.Errorf("Route %s : %s not found", r.Method, r.Path)
}
}
}