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

Function requireExpandWildCardChannel

auth/auth_test.go:3011–3015  ·  view source on GitHub ↗

requireExpandWildCardChannel is a helper function to assert that a user's wildcard channel expansion produces the expected result.

(t *testing.T, user User, expectedChannels, channelsToExpand []string)

Source from the content-addressed store, hash-verified

3009
3010// requireExpandWildCardChannel is a helper function to assert that a user's wildcard channel expansion produces the expected result.
3011func requireExpandWildCardChannel(t *testing.T, user User, expectedChannels, channelsToExpand []string) {
3012 expandedChannels, err := user.expandWildCardChannel(base.SetFromArray(channelsToExpand))
3013 require.NoError(t, err)
3014 assert.Equal(t, base.SetFromArray(expectedChannels), expandedChannels, "Expected channels %v to expand to %v", expectedChannels, channelsToExpand)
3015}

Callers 2

TestUserAccessFunction · 0.85
TestUserCollectionAccessFunction · 0.85

Calls 3

SetFromArrayFunction · 0.92
expandWildCardChannelMethod · 0.65
EqualMethod · 0.45

Tested by

no test coverage detected