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

Function TestDefaultRouter_AddWithoutHandler

router_test.go:3048–3054  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

3046}
3047
3048func TestDefaultRouter_AddWithoutHandler(t *testing.T) {
3049 router := NewRouter(RouterConfig{})
3050
3051 ri, err := router.Add(Route{Method: http.MethodGet, Path: "/info", Handler: nil})
3052 assert.EqualError(t, err, "GET /info: adding route without handler function")
3053 assert.Equal(t, RouteInfo{}, ri)
3054}
3055
3056func TestDefaultRouter_AddDuplicateRouteNotAllowed(t *testing.T) {
3057 e := New()

Callers

nothing calls this directly

Calls 2

AddMethod · 0.95
NewRouterFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…