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

Function TestEchoPut

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

Source from the content-addressed store, hash-verified

875}
876
877func TestEchoPut(t *testing.T) {
878 e := New()
879
880 ri := e.PUT("/", func(c *Context) error {
881 return c.String(http.StatusTeapot, "OK")
882 })
883
884 assert.Equal(t, http.MethodPut, ri.Method)
885 assert.Equal(t, "/", ri.Path)
886 assert.Equal(t, http.MethodPut+":/", ri.Name)
887 assert.Nil(t, ri.Parameters)
888
889 status, body := request(http.MethodPut, "/", e)
890 assert.Equal(t, http.StatusTeapot, status)
891 assert.Equal(t, "OK", body)
892}
893
894func TestEchoTrace(t *testing.T) {
895 e := New()

Callers

nothing calls this directly

Calls 4

NewFunction · 0.85
requestFunction · 0.85
PUTMethod · 0.45
StringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…