mirror of
https://github.com/labstack/echo.git
synced 2025-07-15 01:34:53 +02:00
Total coverage for middleware
Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
@ -4,45 +4,45 @@ import "testing"
|
||||
|
||||
func TestGroupConnect(t *testing.T) {
|
||||
g := New().Group("/group")
|
||||
testMethod(CONNECT, "/", &g.echo, g, t)
|
||||
testMethod(t, &g.echo, g, CONNECT, "/")
|
||||
}
|
||||
|
||||
func TestGroupDelete(t *testing.T) {
|
||||
g := New().Group("/group")
|
||||
testMethod(DELETE, "/", &g.echo, g, t)
|
||||
testMethod(t, &g.echo, g, DELETE, "/")
|
||||
}
|
||||
|
||||
func TestGroupGet(t *testing.T) {
|
||||
g := New().Group("/group")
|
||||
testMethod(GET, "/", &g.echo, g, t)
|
||||
testMethod(t, &g.echo, g, GET, "/")
|
||||
}
|
||||
|
||||
func TestGroupHead(t *testing.T) {
|
||||
g := New().Group("/group")
|
||||
testMethod(HEAD, "/", &g.echo, g, t)
|
||||
testMethod(t, &g.echo, g, HEAD, "/")
|
||||
}
|
||||
|
||||
func TestGroupOptions(t *testing.T) {
|
||||
g := New().Group("/group")
|
||||
testMethod(OPTIONS, "/", &g.echo, g, t)
|
||||
testMethod(t, &g.echo, g, OPTIONS, "/")
|
||||
}
|
||||
|
||||
func TestGroupPatch(t *testing.T) {
|
||||
g := New().Group("/group")
|
||||
testMethod(PATCH, "/", &g.echo, g, t)
|
||||
testMethod(t, &g.echo, g, PATCH, "/")
|
||||
}
|
||||
|
||||
func TestGroupPost(t *testing.T) {
|
||||
g := New().Group("/group")
|
||||
testMethod(POST, "/", &g.echo, g, t)
|
||||
testMethod(t, &g.echo, g, POST, "/")
|
||||
}
|
||||
|
||||
func TestGroupPut(t *testing.T) {
|
||||
g := New().Group("/group")
|
||||
testMethod(PUT, "/", &g.echo, g, t)
|
||||
testMethod(t, &g.echo, g, PUT, "/")
|
||||
}
|
||||
|
||||
func TestGroupTrace(t *testing.T) {
|
||||
g := New().Group("/group")
|
||||
testMethod(TRACE, "/", &g.echo, g, t)
|
||||
testMethod(t, &g.echo, g, TRACE, "/")
|
||||
}
|
||||
|
Reference in New Issue
Block a user