MCPcopy Index your code
hub / github.com/labstack/echo / TestGroup_CONNECT

Function TestGroup_CONNECT

group_test.go:165–181  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

163}
164
165func TestGroup_CONNECT(t *testing.T) {
166 e := New()
167
168 users := e.Group("/users")
169 ri := users.CONNECT("/activate", func(c *Context) error {
170 return c.String(http.StatusTeapot, "OK")
171 })
172
173 assert.Equal(t, http.MethodConnect, ri.Method)
174 assert.Equal(t, "/users/activate", ri.Path)
175 assert.Equal(t, http.MethodConnect+":/users/activate", ri.Name)
176 assert.Nil(t, ri.Parameters)
177
178 status, body := request(http.MethodConnect, "/users/activate", e)
179 assert.Equal(t, http.StatusTeapot, status)
180 assert.Equal(t, `OK`, body)
181}
182
183func TestGroup_DELETE(t *testing.T) {
184 e := New()

Callers

nothing calls this directly

Calls 5

NewFunction · 0.85
requestFunction · 0.85
GroupMethod · 0.45
CONNECTMethod · 0.45
StringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…