MCPcopy Create free account
hub / github.com/belak/gitdir / TestDoesGroupContainUser

Function TestDoesGroupContainUser

repo_test.go:236–246  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

234}
235
236func TestDoesGroupContainUser(t *testing.T) {
237 t.Parallel()
238
239 c := newTestConfig()
240
241 assert.True(t, c.doesGroupContainUser("an-admin", "admins", nil))
242 assert.True(t, c.doesGroupContainUser("an-admin", "nested-admins", nil))
243 assert.False(t, c.doesGroupContainUser("non-admin", "admins", nil))
244 assert.False(t, c.doesGroupContainUser("non-admin", "nested-admins", nil))
245 assert.False(t, c.doesGroupContainUser("an-admin", "loop", nil))
246}
247
248func TestCheckListsForUser(t *testing.T) {
249 t.Parallel()

Callers

nothing calls this directly

Calls 2

newTestConfigFunction · 0.85
doesGroupContainUserMethod · 0.80

Tested by

no test coverage detected