Skip to content

Commit

Permalink
fix routes test failure.
Browse files Browse the repository at this point in the history
  • Loading branch information
o1egl committed Jun 1, 2016
1 parent 7fee34f commit 91d1f19
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions echo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
}

Expand Down

0 comments on commit 91d1f19

Please sign in to comment.