go 1.22, PathValue wildcard test
This commit is contained in:
parent
fd0ff0e45e
commit
ec67a86832
1 changed files with 8 additions and 0 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue