requireCannotSeeCollectionChannels asserts that the principal cannot see any of the specified channels in the given collection
(t *testing.T, scope, collection string, princ Principal, channels ...string)
| 30 | |
| 31 | // requireCannotSeeCollectionChannels asserts that the principal cannot see any of the specified channels in the given collection |
| 32 | func requireCannotSeeCollectionChannels(t *testing.T, scope, collection string, princ Principal, channels ...string) { |
| 33 | for _, channel := range channels { |
| 34 | canSee, err := princ.CanSeeCollectionChannel(scope, collection, channel) |
| 35 | require.NoError(t, err) |
| 36 | require.False(t, canSee, "Expected %s to NOT be able to see channel %q in %s.%s", princ.Name(), channel, scope, collection) |
| 37 | } |
| 38 | } |
| 39 | |
| 40 | func TestUserCollectionAccess(t *testing.T) { |
| 41 |
no test coverage detected