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

Function TestEchoTrace

echo_test.go:894–909  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

892}
893
894func TestEchoTrace(t *testing.T) {
895 e := New()
896
897 ri := e.TRACE("/", func(c *Context) error {
898 return c.String(http.StatusTeapot, "OK")
899 })
900
901 assert.Equal(t, http.MethodTrace, ri.Method)
902 assert.Equal(t, "/", ri.Path)
903 assert.Equal(t, http.MethodTrace+":/", ri.Name)
904 assert.Nil(t, ri.Parameters)
905
906 status, body := request(http.MethodTrace, "/", e)
907 assert.Equal(t, http.StatusTeapot, status)
908 assert.Equal(t, "OK", body)
909}
910
911func TestEcho_Any(t *testing.T) {
912 e := New()

Callers

nothing calls this directly

Calls 4

NewFunction · 0.85
requestFunction · 0.85
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…