Skip to content

Commit 628a2df

Browse files
committed
Revert "Add a test"
This reverts commit 7a1126f
1 parent ea31edb commit 628a2df

File tree

1 file changed

+0
-34
lines changed

1 file changed

+0
-34
lines changed

group_test.go

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -119,37 +119,3 @@ func TestGroupRouteMiddlewareWithMatchAny(t *testing.T) {
119119
assert.Equal(t, "/*", m)
120120

121121
}
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-
}

0 commit comments

Comments
 (0)