SAVEPOINT

This commit is contained in:
luke.rodham
2017-11-10 10:52:11 +00:00
parent a189881568
commit 59301c7622
12 changed files with 455 additions and 7 deletions

22
default_router_test.go Normal file
View File

@@ -0,0 +1,22 @@
package tuu_test
import (
"testing"
"github.com/stretchr/testify/require"
"gitlab.com/lrodham/tuu"
)
func Test_Route_Creation(t *testing.T) {
r := require.New(t)
router := tuu.NewRouter()
router.GET("/testing", func(ctx tuu.Context) error { return nil })
routes := router.GetRoutes()
r.Len(routes, 1)
route := routes[0]
r.Equal("GET", route.Method)
r.Equal("/testing", route.Path)
}