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:
parent
7fee34fade
commit
91d1f199cb
14
echo_test.go
14
echo_test.go
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user