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

Function TestEchoConnect

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

Source from the content-addressed store, hash-verified

756}
757
758func TestEchoConnect(t *testing.T) {
759 e := New()
760
761 ri := e.CONNECT("/", func(c *Context) error {
762 return c.String(http.StatusTeapot, "OK")
763 })
764
765 assert.Equal(t, http.MethodConnect, ri.Method)
766 assert.Equal(t, "/", ri.Path)
767 assert.Equal(t, http.MethodConnect+":/", ri.Name)
768 assert.Nil(t, ri.Parameters)
769
770 status, body := request(http.MethodConnect, "/", e)
771 assert.Equal(t, http.StatusTeapot, status)
772 assert.Equal(t, "OK", body)
773}
774
775func TestEchoDelete(t *testing.T) {
776 e := New()

Callers

nothing calls this directly

Calls 4

NewFunction · 0.85
requestFunction · 0.85
CONNECTMethod · 0.45
StringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…