File tree Expand file tree Collapse file tree 1 file changed +0
-34
lines changed Expand file tree Collapse file tree 1 file changed +0
-34
lines changed Original file line number Diff line number Diff line change @@ -119,37 +119,3 @@ func TestGroupRouteMiddlewareWithMatchAny(t *testing.T) {
119
119
assert .Equal (t , "/*" , m )
120
120
121
121
}
122
-
123
- func TestMultipleGroupSamePathMiddleware (t * testing.T ) {
124
- // Ensure multiple groups with the same path do not clobber previous routes or mixup middlewares
125
- e := New ()
126
- m1 := func (next HandlerFunc ) HandlerFunc {
127
- return func (c Context ) error {
128
- c .Set ("middleware" , "m1" )
129
- return next (c )
130
- }
131
- }
132
- m2 := func (next HandlerFunc ) HandlerFunc {
133
- return func (c Context ) error {
134
- c .Set ("middleware" , "m2" )
135
- return next (c )
136
- }
137
- }
138
- h := func (c Context ) error {
139
- return c .String (http .StatusOK , c .Get ("middleware" ).(string ))
140
- }
141
-
142
- g1 := e .Group ("/group" , m1 )
143
- {
144
- g1 .GET ("" , h )
145
- }
146
- g2 := e .Group ("/group" , m2 )
147
- {
148
- g2 .GET ("/other" , h )
149
- }
150
-
151
- _ , m := request (http .MethodGet , "/group" , e )
152
- assert .Equal (t , "m1" , m )
153
- _ , m = request (http .MethodGet , "/group/other" , e )
154
- assert .Equal (t , "m2" , m )
155
- }
You can’t perform that action at this time.
0 commit comments