MCPcopy
hub / github.com/gofiber/fiber / Test_App_Remove_Route_By_Name

Function Test_App_Remove_Route_By_Name

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

Source from the content-addressed store, hash-verified

941}
942
943func Test_App_Remove_Route_By_Name(t *testing.T) {
944 t.Parallel()
945 app := New()
946
947 app.Get("/api/test", func(c Ctx) error {
948 return c.SendStatus(StatusOK)
949 }).Name("test")
950
951 app.RemoveRouteByName("test", MethodGet)
952 app.RebuildTree()
953
954 verifyRequest(t, app, "/test", StatusNotFound)
955 verifyThereAreNoRoutes(t, app)
956}
957
958func Test_App_Remove_Route_By_Name_Non_Existing_Route(t *testing.T) {
959 t.Parallel()

Callers

nothing calls this directly

Calls 8

verifyRequestFunction · 0.85
verifyThereAreNoRoutesFunction · 0.85
RemoveRouteByNameMethod · 0.80
RebuildTreeMethod · 0.80
NewFunction · 0.70
NameMethod · 0.65
GetMethod · 0.65
SendStatusMethod · 0.65

Tested by

no test coverage detected