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

Function TestGroup_TRACE

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

Source from the content-addressed store, hash-verified

289}
290
291func TestGroup_TRACE(t *testing.T) {
292 e := New()
293
294 users := e.Group("/users")
295 ri := users.TRACE("/activate", func(c *Context) error {
296 return c.String(http.StatusTeapot, "OK")
297 })
298
299 assert.Equal(t, http.MethodTrace, ri.Method)
300 assert.Equal(t, "/users/activate", ri.Path)
301 assert.Equal(t, http.MethodTrace+":/users/activate", ri.Name)
302 assert.Nil(t, ri.Parameters)
303
304 status, body := request(http.MethodTrace, "/users/activate", e)
305 assert.Equal(t, http.StatusTeapot, status)
306 assert.Equal(t, `OK`, body)
307}
308
309func TestGroup_RouteNotFound(t *testing.T) {
310 var testCases = []struct {

Callers

nothing calls this directly

Calls 5

NewFunction · 0.85
requestFunction · 0.85
GroupMethod · 0.45
TRACEMethod · 0.45
StringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…