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

Function TestEchoDelete

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

Source from the content-addressed store, hash-verified

773}
774
775func TestEchoDelete(t *testing.T) {
776 e := New()
777
778 ri := e.DELETE("/", func(c *Context) error {
779 return c.String(http.StatusTeapot, "OK")
780 })
781
782 assert.Equal(t, http.MethodDelete, ri.Method)
783 assert.Equal(t, "/", ri.Path)
784 assert.Equal(t, http.MethodDelete+":/", ri.Name)
785 assert.Nil(t, ri.Parameters)
786
787 status, body := request(http.MethodDelete, "/", e)
788 assert.Equal(t, http.StatusTeapot, status)
789 assert.Equal(t, "OK", body)
790}
791
792func TestEchoGet(t *testing.T) {
793 e := New()

Callers

nothing calls this directly

Calls 4

NewFunction · 0.85
requestFunction · 0.85
DELETEMethod · 0.45
StringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…