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

Function TestGroup_DELETE

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

Source from the content-addressed store, hash-verified

181}
182
183func TestGroup_DELETE(t *testing.T) {
184 e := New()
185
186 users := e.Group("/users")
187 ri := users.DELETE("/activate", func(c *Context) error {
188 return c.String(http.StatusTeapot, "OK")
189 })
190
191 assert.Equal(t, http.MethodDelete, ri.Method)
192 assert.Equal(t, "/users/activate", ri.Path)
193 assert.Equal(t, http.MethodDelete+":/users/activate", ri.Name)
194 assert.Nil(t, ri.Parameters)
195
196 status, body := request(http.MethodDelete, "/users/activate", e)
197 assert.Equal(t, http.StatusTeapot, status)
198 assert.Equal(t, `OK`, body)
199}
200
201func TestGroup_HEAD(t *testing.T) {
202 e := New()

Callers

nothing calls this directly

Calls 5

NewFunction · 0.85
requestFunction · 0.85
GroupMethod · 0.45
DELETEMethod · 0.45
StringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…