From d2b378c7930020de26e745f8528ab33c635446f0 Mon Sep 17 00:00:00 2001 From: ProgrammingMuffin Date: Mon, 18 Dec 2023 14:44:40 +0530 Subject: [PATCH] fix: test scenario update --- router_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/router_test.go b/router_test.go index 79c292407..275447f4a 100644 --- a/router_test.go +++ b/router_test.go @@ -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 @@ -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"}, }, }