1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-18 10:27:06 +00:00

Update to version 12.1.7

Former-commit-id: 3e214ab6b6da4d1c6e4a66180a4ccfa61c0879ae
This commit is contained in:
Gerasimos (Makis) Maropoulos
2020-02-10 19:40:17 +02:00
parent ea589b1276
commit 10f280af63
15 changed files with 357 additions and 123 deletions

View File

@@ -0,0 +1,22 @@
package main
import (
"testing"
"github.com/kataras/iris/v12/core/router"
"github.com/kataras/iris/v12/httptest"
)
func TestRouteRegisterRuleExample(t *testing.T) {
app := newApp()
e := httptest.New(t, app)
for _, method := range router.AllMethods {
tt := e.Request(method, "/").Expect().Status(httptest.StatusOK).Body()
if method == "GET" {
tt.Equal("From [./main.go:28] GET: / -> github.com/kataras/iris/v12/_examples/routing/route-register-rule.getHandler()")
} else {
tt.Equal("From [./main.go:30] " + method + ": / -> github.com/kataras/iris/v12/_examples/routing/route-register-rule.anyHandler()")
}
}
}