Skip to content

Commit

Permalink
fix: test scenario update
Browse files Browse the repository at this point in the history
  • Loading branch information
ProgrammingMuffin committed Dec 18, 2023
1 parent 852450e commit d2b378c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions router_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,7 @@ func TestRouterRangeParam(t *testing.T) {
r := e.router

r.Add(http.MethodGet, "/flights/{from}.{to}", handlerFunc)
r.Add(http.MethodGet, "/flights/{from}-{to}", handlerFunc)
r.Add(http.MethodGet, "/flights/{from}to{to}", handlerFunc)

var testCases = []struct {
name string
Expand All @@ -748,9 +748,9 @@ func TestRouterRangeParam(t *testing.T) {
expectParam: map[string]string{"from": "LAX", "to": "DEN"},
},
{
name: "route /flights/LAX-DEN to /flights/{from}-{to}",
whenURL: "/flights/LAX-DEN",
expectRoute: "/flights/{from}-{to}",
name: "route /flights/LAXtoDEN to /flights/{from}to{to}",
whenURL: "/flights/LAXtoDEN",
expectRoute: "/flights/{from}to{to}",
expectParam: map[string]string{"from": "LAX", "to": "DEN"},
},
}
Expand Down

0 comments on commit d2b378c

Please sign in to comment.