1
0
mirror of https://github.com/labstack/echo.git synced 2025-06-25 00:47:01 +02:00

Fixed a router test

Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
Vishal Rana
2015-04-24 07:54:45 -07:00
parent e3dcf6c6e7
commit c7ddf65594

View File

@ -592,14 +592,14 @@ func TestRouterAPI(t *testing.T) {
} }
return nil return nil
}, nil) }, nil)
// Reset params
params = make(Params, 5)
c := &Context{params: params} c := &Context{params: params}
h, _ := r.Find(route.method, route.path, params) h, _ := r.Find(route.method, route.path, params)
if h == nil { if h == nil {
t.Fatalf("handler not found, method=%s, path=%s", route.method, route.path) t.Fatalf("handler not found, method=%s, path=%s", route.method, route.path)
} }
h(c) h(c)
// Reset params
params = make(Params, 5)
} }
} }