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

Function TestToContext_RouteInfo

echotest/context_test.go:80–99  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

78}
79
80func TestToContext_RouteInfo(t *testing.T) {
81 testConf := ContextConfig{
82 RouteInfo: &echo.RouteInfo{
83 Name: "my_route",
84 Method: http.MethodGet,
85 Path: "/:id",
86 Parameters: []string{"id"},
87 },
88 }
89 c := testConf.ToContext(t)
90
91 ri := c.RouteInfo()
92
93 assert.Equal(t, echo.RouteInfo{
94 Name: "my_route",
95 Method: http.MethodGet,
96 Path: "/:id",
97 Parameters: []string{"id"},
98 }, ri)
99}
100
101func TestToContext_FormValues(t *testing.T) {
102 testConf := ContextConfig{

Callers

nothing calls this directly

Calls 2

ToContextMethod · 0.95
RouteInfoMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…