Skip to content

Commit

Permalink
More testing coverage in routes
Browse files Browse the repository at this point in the history
  • Loading branch information
PiterWeb committed Aug 8, 2023
1 parent e41d85d commit d7e6d81
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions routes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,24 @@ import (
func TestCreateRouter(t *testing.T) {

routes := []Route{
{
Path: "/",
Method: "get",
Handle: func(ctx *Ctx) error {
ctx.WriteString("I am an index route")
return nil
},
Children: []Route{ //This will give a warning
{
Path: "/raw",
Method: "get",
Handle: func(ctx *Ctx) error {
ctx.WriteString(BodyResponse)
return nil
},
},
},
},
{
Path: "/index",
Handle: func(ctx *Ctx) error {
Expand Down

0 comments on commit d7e6d81

Please sign in to comment.