@@ -32,13 +32,20 @@ var routeTestCases = map[string]*Route{
32
32
FixedParams : []string {},
33
33
},
34
34
35
- `get /apps /:appId/ Application.Show` : & Route {
35
+ `get /app /:appId/ Application.Show` : & Route {
36
36
Method : "GET" ,
37
- Path : `/apps /:appId/` ,
37
+ Path : `/app /:appId/` ,
38
38
Action : "Application.Show" ,
39
39
FixedParams : []string {},
40
40
},
41
41
42
+ `get /app-wild/*appId/ Application.WildShow` : & Route {
43
+ Method : "GET" ,
44
+ Path : `/app-wild/*appId/` ,
45
+ Action : "Application.WildShow" ,
46
+ FixedParams : []string {},
47
+ },
48
+
42
49
`GET /public/:filepath Static.Serve("public")` : & Route {
43
50
Method : "GET" ,
44
51
Path : "/public/:filepath" ,
@@ -107,6 +114,7 @@ const TEST_ROUTES = `
107
114
GET / Application.Index
108
115
GET /test/ Application.Index("Test", "Test2")
109
116
GET /app/:id/ Application.Show
117
+ GET /app-wild/*id/ Application.WildShow
110
118
POST /app/:id Application.Save
111
119
PATCH /app/:id/ Application.Update
112
120
GET /javascript/:filepath Static.Serve("public/js")
@@ -316,6 +324,16 @@ var reverseRoutingTestCases = map[*ReverseRouteArgs]*ActionDefinition{
316
324
Star : false ,
317
325
Action : "Application.Save" ,
318
326
},
327
+
328
+ & ReverseRouteArgs {
329
+ action : "Application.WildShow" ,
330
+ args : map [string ]string {"id" : "123" },
331
+ }: & ActionDefinition {
332
+ Url : "/app-wild/123/" ,
333
+ Method : "GET" ,
334
+ Star : false ,
335
+ Action : "Application.WildShow" ,
336
+ },
319
337
}
320
338
321
339
func TestReverseRouting (t * testing.T ) {
0 commit comments