(t *testing.T)
| 563 | } |
| 564 | |
| 565 | func Test_Hook_OnMount(t *testing.T) { |
| 566 | t.Parallel() |
| 567 | app := New() |
| 568 | app.Get("/", testSimpleHandler).Name("x") |
| 569 | |
| 570 | subApp := New() |
| 571 | subApp.Get("/test", testSimpleHandler) |
| 572 | |
| 573 | subApp.Hooks().OnMount(func(parent *App) error { |
| 574 | require.Empty(t, parent.mountFields.mountPath) |
| 575 | |
| 576 | return nil |
| 577 | }) |
| 578 | |
| 579 | app.Use("/sub", subApp) |
| 580 | } |
| 581 | |
| 582 | func Test_executeOnRouteHooks_ErrorWithMount(t *testing.T) { |
| 583 | t.Parallel() |