Updates tree.go + fixes + unit tests

This commit is contained in:
Manu Mtz-Almeida
2015-05-05 16:37:33 +02:00
parent 295201dad2
commit f212ae7728
5 changed files with 113 additions and 25 deletions
+3
View File
@@ -25,6 +25,9 @@ func TestCreateEngine(t *testing.T) {
assert.Equal(t, "/", router.absolutePath)
assert.Equal(t, router.engine, router)
assert.Empty(t, router.Handlers)
assert.True(t, router.RedirectTrailingSlash)
assert.True(t, router.RedirectFixedPath)
assert.True(t, router.HandleMethodNotAllowed)
assert.Panics(t, func() { router.handle("", "/", []HandlerFunc{func(_ *Context) {}}) })
assert.Panics(t, func() { router.handle("GET", "", []HandlerFunc{func(_ *Context) {}}) })