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

Function TestEchoOptions

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

Source from the content-addressed store, hash-verified

824}
825
826func TestEchoOptions(t *testing.T) {
827 e := New()
828
829 ri := e.OPTIONS("/", func(c *Context) error {
830 return c.String(http.StatusTeapot, "OK")
831 })
832
833 assert.Equal(t, http.MethodOptions, ri.Method)
834 assert.Equal(t, "/", ri.Path)
835 assert.Equal(t, http.MethodOptions+":/", ri.Name)
836 assert.Nil(t, ri.Parameters)
837
838 status, body := request(http.MethodOptions, "/", e)
839 assert.Equal(t, http.StatusTeapot, status)
840 assert.Equal(t, "OK", body)
841}
842
843func TestEchoPatch(t *testing.T) {
844 e := New()

Callers

nothing calls this directly

Calls 4

NewFunction · 0.85
requestFunction · 0.85
OPTIONSMethod · 0.45
StringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…