MCPcopy Index your code
hub / github.com/apache/casbin / testGetImplicitRoles

Function testGetImplicitRoles

rbac_api_test.go:290–298  ·  view source on GitHub ↗
(t *testing.T, e *Enforcer, name string, res []string)

Source from the content-addressed store, hash-verified

288}
289
290func testGetImplicitRoles(t *testing.T, e *Enforcer, name string, res []string) {
291 t.Helper()
292 myRes, _ := e.GetImplicitRolesForUser(name)
293 t.Log("Implicit roles for ", name, ": ", myRes)
294
295 if !util.SetEquals(res, myRes) {
296 t.Error("Implicit roles for ", name, ": ", myRes, ", supposed to be ", res)
297 }
298}
299
300func testGetImplicitRolesInDomain(t *testing.T, e *Enforcer, name string, domain string, res []string) {
301 t.Helper()

Callers 1

TestImplicitRoleAPIFunction · 0.85

Calls 3

SetEqualsFunction · 0.92
ErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…