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

Function TestNewConditionalHandler

_examples/routing/conditional-chain/main_test.go:9–17  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

7)
8
9func TestNewConditionalHandler(t *testing.T) {
10 app := newApp()
11 e := httptest.New(t, app)
12
13 e.GET("/api/v1/users").Expect().Status(httptest.StatusOK).
14 Body().IsEqual("requested: <b>/api/v1/users</b>")
15 e.GET("/api/v1/users").WithQuery("admin", "true").Expect().Status(httptest.StatusOK).
16 Body().IsEqual("<title>Admin</title>\n<h1>Hello Admin</h1><br>requested: <b>/api/v1/users</b>")
17}

Callers

nothing calls this directly

Calls 4

NewFunction · 0.92
StatusMethod · 0.80
newAppFunction · 0.70
BodyMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…