go 1.22, PathValue wildcard test

This commit is contained in:
Peter Kieltyka 2024-02-16 19:23:38 -05:00
parent fd0ff0e45e
commit ec67a86832

View file

@ -35,6 +35,14 @@ func TestPathValue(t *testing.T) {
requestPath: "/users/Gojo/conversations/2948",
expectedBody: "Gojo 2948",
},
{
name: "Wildcard path",
pattern: "/users/{userID}/friends/*",
method: "POST",
pathKeys: []string{"userID", "*"},
requestPath: "/users/Gojo/friends/all-of-them/and/more",
expectedBody: "Gojo all-of-them/and/more",
},
}
for _, tc := range testCases {