(t *testing.T)
| 628 | } |
| 629 | |
| 630 | func Test_executeOnGroupNameHooks_ErrorWithMount(t *testing.T) { |
| 631 | t.Parallel() |
| 632 | app := New() |
| 633 | app.mountFields.mountPath = testMountPath |
| 634 | |
| 635 | var prefix string |
| 636 | app.Hooks().OnGroupName(func(g Group) error { |
| 637 | prefix = g.Prefix |
| 638 | return errors.New("group name error") |
| 639 | }) |
| 640 | |
| 641 | err := app.hooks.executeOnGroupNameHooks(Group{Prefix: "/grp"}) |
| 642 | require.Equal(t, testMountPath+"/grp", prefix) |
| 643 | require.EqualError(t, err, "group name error") |
| 644 | } |
| 645 | |
| 646 | func Test_executeOnListenHooks_Error(t *testing.T) { |
| 647 | t.Parallel() |
nothing calls this directly
no test coverage detected