Skip to content

Commit ec67a86

Browse files
committed
go 1.22, PathValue wildcard test
1 parent fd0ff0e commit ec67a86

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

path_value_test.go

+8
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,14 @@ func TestPathValue(t *testing.T) {
3535
requestPath: "/users/Gojo/conversations/2948",
3636
expectedBody: "Gojo 2948",
3737
},
38+
{
39+
name: "Wildcard path",
40+
pattern: "/users/{userID}/friends/*",
41+
method: "POST",
42+
pathKeys: []string{"userID", "*"},
43+
requestPath: "/users/Gojo/friends/all-of-them/and/more",
44+
expectedBody: "Gojo all-of-them/and/more",
45+
},
3846
}
3947

4048
for _, tc := range testCases {

0 commit comments

Comments
 (0)