MCPcopy
hub / github.com/labstack/echo / TestEcho_Any_hasLowerPriority

Function TestEcho_Any_hasLowerPriority

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

Source from the content-addressed store, hash-verified

926}
927
928func TestEcho_Any_hasLowerPriority(t *testing.T) {
929 e := New()
930
931 e.Any("/activate", func(c *Context) error {
932 return c.String(http.StatusTeapot, "ANY")
933 })
934 e.GET("/activate", func(c *Context) error {
935 return c.String(http.StatusLocked, "GET")
936 })
937
938 status, body := request(http.MethodTrace, "/activate", e)
939 assert.Equal(t, http.StatusTeapot, status)
940 assert.Equal(t, `ANY`, body)
941
942 status, body = request(http.MethodGet, "/activate", e)
943 assert.Equal(t, http.StatusLocked, status)
944 assert.Equal(t, `GET`, body)
945}
946
947func TestEchoMatch(t *testing.T) { // JFC
948 e := New()

Callers

nothing calls this directly

Calls 5

NewFunction · 0.85
requestFunction · 0.85
AnyMethod · 0.45
StringMethod · 0.45
GETMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…