(t *testing.T)
| 596 | } |
| 597 | |
| 598 | func Test_executeOnNameHooks_ErrorWithMount(t *testing.T) { |
| 599 | t.Parallel() |
| 600 | app := New() |
| 601 | app.mountFields.mountPath = testMountPath |
| 602 | |
| 603 | var received string |
| 604 | app.Hooks().OnName(func(r Route) error { |
| 605 | received = r.Path |
| 606 | return errors.New("name error") |
| 607 | }) |
| 608 | |
| 609 | err := app.hooks.executeOnNameHooks(&Route{Path: "/bar", path: "/bar"}) |
| 610 | require.Equal(t, testMountPath+"/bar", received) |
| 611 | require.EqualError(t, err, "name error") |
| 612 | } |
| 613 | |
| 614 | func Test_executeOnGroupHooks_ErrorWithMount(t *testing.T) { |
| 615 | t.Parallel() |
nothing calls this directly
no test coverage detected