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

Function TestContextRequest

context_test.go:104–113  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

102}
103
104func TestContextRequest(t *testing.T) {
105 e := New()
106 req := httptest.NewRequest(http.MethodPost, "/", strings.NewReader(userJSON))
107 rec := httptest.NewRecorder()
108
109 c := e.NewContext(req, rec)
110
111 assert.NotNil(t, c.Request())
112 assert.Equal(t, req, c.Request())
113}
114
115func TestContextResponse(t *testing.T) {
116 e := New()

Callers

nothing calls this directly

Calls 3

RequestMethod · 0.95
NewFunction · 0.85
NewContextMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…