mirror of
https://github.com/cubixle/tuu.git
synced 2026-04-24 22:44:46 +01:00
SAVEPOINT
This commit is contained in:
22
default_router_test.go
Normal file
22
default_router_test.go
Normal 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)
|
||||
}
|
||||
Reference in New Issue
Block a user