(t *testing.T)
| 72 | } |
| 73 | |
| 74 | func TestControllerMethodFuncs(t *testing.T) { |
| 75 | app := iris.New() |
| 76 | |
| 77 | New(app).Handle(new(testController)) |
| 78 | New(app.Party("/all")).Handle(new(testControllerAll)) |
| 79 | New(app.Party("/any")).Handle(new(testControllerAny)) |
| 80 | |
| 81 | e := httptest.New(t, app) |
| 82 | for _, method := range router.AllMethods { |
| 83 | |
| 84 | e.Request(method, "/").Expect().Status(iris.StatusOK). |
| 85 | Body().IsEqual(method) |
| 86 | |
| 87 | e.Request(method, "/all").Expect().Status(iris.StatusOK). |
| 88 | Body().IsEqual(method) |
| 89 | |
| 90 | e.Request(method, "/any").Expect().Status(iris.StatusOK). |
| 91 | Body().IsEqual(method) |
| 92 | } |
| 93 | } |
| 94 | |
| 95 | type testControllerBeginAndEndRequestFunc struct { |
| 96 | Ctx *context.Context |
nothing calls this directly
no test coverage detected
searching dependent graphs…