1
0
mirror of https://github.com/labstack/echo.git synced 2025-06-17 00:17:36 +02:00
Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
Vishal Rana
2015-09-15 08:29:29 -07:00
parent 68e00e964c
commit f251eead67
2 changed files with 18 additions and 1 deletions

View File

@ -352,6 +352,23 @@ func TestRouterMicroParam(t *testing.T) {
}
}
func TestRouterMixParamMatchAny(t *testing.T) {
e := New()
r := e.router
// Route
r.Add(GET, "/users/:id/*", func(c *Context) error {
return nil
}, e)
c := NewContext(nil, nil, e)
h, _ := r.Find(GET, "/users/joe/comments", c)
if assert.NotNil(t, h) {
h(c)
assert.Equal(t, "joe", c.P(0))
}
}
func TestRouterMultiRoute(t *testing.T) {
e := New()
r := e.router