MCPcopy Create free account
hub / github.com/kataras/iris / TestControllerMethodFuncs

Function TestControllerMethodFuncs

mvc/controller_test.go:74–93  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

72}
73
74func 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
95type testControllerBeginAndEndRequestFunc struct {
96 Ctx *context.Context

Callers

nothing calls this directly

Calls 8

NewFunction · 0.92
NewMethod · 0.80
StatusMethod · 0.80
RequestMethod · 0.80
NewFunction · 0.70
HandleMethod · 0.65
PartyMethod · 0.65
BodyMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…