requireCanSeeChannels asserts that the given principal can see all of the specified channels.
(t *testing.T, princ Principal, channels ...string)
| 34 | |
| 35 | // requireCanSeeChannels asserts that the given principal can see all of the specified channels. |
| 36 | func requireCanSeeChannels(t *testing.T, princ Principal, channels ...string) { |
| 37 | for _, channel := range channels { |
| 38 | canSee, err := princ.canSeeChannel(channel) |
| 39 | require.NoError(t, err) |
| 40 | require.True(t, canSee, "Expected %s to be able to see channel %q", princ.Name(), channel) |
| 41 | } |
| 42 | } |
| 43 | |
| 44 | // assertCannotSeeChannels asserts that the given principal cannot see any of the specified channels. |
| 45 | func requireCannotSeeChannels(t *testing.T, princ Principal, channels ...string) { |
no test coverage detected