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

Function TestGetListWithDomains

management_api_test.go:47–55  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

45}
46
47func TestGetListWithDomains(t *testing.T) {
48 e, _ := NewEnforcer("examples/rbac_with_domains_model.conf", "examples/rbac_with_domains_policy.csv")
49
50 testStringList(t, "Subjects", e.GetAllSubjects, []string{"admin"})
51 testStringList(t, "Objects", e.GetAllObjects, []string{"data1", "data2"})
52 testStringList(t, "Actions", e.GetAllActions, []string{"read", "write"})
53 testStringList(t, "Roles", e.GetAllRoles, []string{"admin"})
54 testStringList(t, "Users", e.GetAllUsers, []string{})
55}
56
57func testGetPolicy(t *testing.T, e *Enforcer, res [][]string) {
58 t.Helper()

Callers

nothing calls this directly

Calls 2

NewEnforcerFunction · 0.85
testStringListFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…