2015-05-30 01:00:02 +02:00
|
|
|
package echo
|
|
|
|
|
|
|
|
import "testing"
|
|
|
|
|
2015-05-31 00:20:36 +02:00
|
|
|
func TestGroup(t *testing.T) {
|
|
|
|
g := New().Group("/group")
|
2016-04-02 23:19:39 +02:00
|
|
|
h := func(Context) error { return nil }
|
2016-04-20 16:32:51 +02:00
|
|
|
g.CONNECT("/", h)
|
|
|
|
g.DELETE("/", h)
|
|
|
|
g.GET("/", h)
|
|
|
|
g.HEAD("/", h)
|
|
|
|
g.OPTIONS("/", h)
|
|
|
|
g.PATCH("/", h)
|
|
|
|
g.POST("/", h)
|
|
|
|
g.PUT("/", h)
|
|
|
|
g.TRACE("/", h)
|
2016-04-09 23:00:23 +02:00
|
|
|
g.Any("/", h)
|
|
|
|
g.Match([]string{GET, POST}, "/", h)
|
|
|
|
g.Static("/static", "/tmp")
|
|
|
|
g.File("/walle", "_fixture/images//walle.png")
|
2015-05-30 01:00:02 +02:00
|
|
|
}
|