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")
|
|
|
|
h := func(*Context) error { return nil }
|
|
|
|
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-01-09 20:34:34 +02:00
|
|
|
g.Any("/", h)
|
|
|
|
g.Match([]string{GET, POST}, "/", h)
|
2015-05-31 00:20:36 +02:00
|
|
|
g.WebSocket("/ws", h)
|
|
|
|
g.Static("/scripts", "scripts")
|
|
|
|
g.ServeDir("/scripts", "scripts")
|
|
|
|
g.ServeFile("/scripts/main.js", "scripts/main.js")
|
2015-05-30 01:00:02 +02:00
|
|
|
}
|