(t *testing.T)
| 633 | } |
| 634 | |
| 635 | func TestRouterStaticFSNotFound(t *testing.T) { |
| 636 | router := New() |
| 637 | router.StaticFS("/", http.FileSystem(http.Dir("/thisreallydoesntexist/"))) |
| 638 | router.NoRoute(func(c *Context) { |
| 639 | c.String(http.StatusNotFound, "non existent") |
| 640 | }) |
| 641 | |
| 642 | w := PerformRequest(router, http.MethodGet, "/nonexistent") |
| 643 | assert.Equal(t, "non existent", w.Body.String()) |
| 644 | |
| 645 | w = PerformRequest(router, http.MethodHead, "/nonexistent") |
| 646 | assert.Equal(t, "non existent", w.Body.String()) |
| 647 | } |
| 648 | |
| 649 | func TestRouterStaticFSFileNotFound(t *testing.T) { |
| 650 | router := New() |
nothing calls this directly
no test coverage detected