1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-18 10:27:06 +00:00
Files
kararas_iris/_examples/routing/route-register-rule/main_test.go
Gerasimos (Makis) Maropoulos 27ca1c93f5 logging: several improvements
Former-commit-id: 12538c74a1aa55314c35ac3cf2665646b704851d
2020-04-28 01:58:56 +03:00

23 lines
591 B
Go

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 GET: github.com/kataras/iris/v12/_examples/routing/route-register-rule.getHandler")
} else {
tt.Equal("From " + method + ": github.com/kataras/iris/v12/_examples/routing/route-register-rule.anyHandler")
}
}
}