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

Function TestGroup_PUT

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

Source from the content-addressed store, hash-verified

271}
272
273func TestGroup_PUT(t *testing.T) {
274 e := New()
275
276 users := e.Group("/users")
277 ri := users.PUT("/activate", func(c *Context) error {
278 return c.String(http.StatusTeapot, "OK")
279 })
280
281 assert.Equal(t, http.MethodPut, ri.Method)
282 assert.Equal(t, "/users/activate", ri.Path)
283 assert.Equal(t, http.MethodPut+":/users/activate", ri.Name)
284 assert.Nil(t, ri.Parameters)
285
286 status, body := request(http.MethodPut, "/users/activate", e)
287 assert.Equal(t, http.StatusTeapot, status)
288 assert.Equal(t, `OK`, body)
289}
290
291func TestGroup_TRACE(t *testing.T) {
292 e := New()

Callers

nothing calls this directly

Calls 5

NewFunction · 0.85
requestFunction · 0.85
GroupMethod · 0.45
PUTMethod · 0.45
StringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…