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

Function TestEchoPatch

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

Source from the content-addressed store, hash-verified

841}
842
843func TestEchoPatch(t *testing.T) {
844 e := New()
845
846 ri := e.PATCH("/", func(c *Context) error {
847 return c.String(http.StatusTeapot, "OK")
848 })
849
850 assert.Equal(t, http.MethodPatch, ri.Method)
851 assert.Equal(t, "/", ri.Path)
852 assert.Equal(t, http.MethodPatch+":/", ri.Name)
853 assert.Nil(t, ri.Parameters)
854
855 status, body := request(http.MethodPatch, "/", e)
856 assert.Equal(t, http.StatusTeapot, status)
857 assert.Equal(t, "OK", body)
858}
859
860func TestEchoPost(t *testing.T) {
861 e := New()

Callers

nothing calls this directly

Calls 4

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