MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / requireCannotSeeCollectionChannels

Function requireCannotSeeCollectionChannels

auth/collection_access_test.go:32–38  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

30
31// requireCannotSeeCollectionChannels asserts that the principal cannot see any of the specified channels in the given collection
32func 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
40func TestUserCollectionAccess(t *testing.T) {
41

Callers 1

TestUserCollectionAccessFunction · 0.85

Calls 2

NameMethod · 0.65

Tested by

no test coverage detected