TestHandleHeadToDir - ensure the root/sub dir handles properly
(t *testing.T)
| 460 | |
| 461 | // TestHandleHeadToDir - ensure the root/sub dir handles properly |
| 462 | func TestRouteStaticNoListing(t *testing.T) { |
| 463 | router := New() |
| 464 | router.Static("/", "./") |
| 465 | |
| 466 | w := PerformRequest(router, http.MethodGet, "/") |
| 467 | |
| 468 | assert.Equal(t, http.StatusNotFound, w.Code) |
| 469 | assert.NotContains(t, w.Body.String(), "gin.go") |
| 470 | } |
| 471 | |
| 472 | func TestRouterMiddlewareAndStatic(t *testing.T) { |
| 473 | router := New() |
nothing calls this directly
no test coverage detected