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

Function TestGroup_PATCH

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

Source from the content-addressed store, hash-verified

235}
236
237func TestGroup_PATCH(t *testing.T) {
238 e := New()
239
240 users := e.Group("/users")
241 ri := users.PATCH("/activate", func(c *Context) error {
242 return c.String(http.StatusTeapot, "OK")
243 })
244
245 assert.Equal(t, http.MethodPatch, ri.Method)
246 assert.Equal(t, "/users/activate", ri.Path)
247 assert.Equal(t, http.MethodPatch+":/users/activate", ri.Name)
248 assert.Nil(t, ri.Parameters)
249
250 status, body := request(http.MethodPatch, "/users/activate", e)
251 assert.Equal(t, http.StatusTeapot, status)
252 assert.Equal(t, `OK`, body)
253}
254
255func TestGroup_POST(t *testing.T) {
256 e := New()

Callers

nothing calls this directly

Calls 5

NewFunction · 0.85
requestFunction · 0.85
GroupMethod · 0.45
PATCHMethod · 0.45
StringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…