(t *testing.T)
| 45 | } |
| 46 | |
| 47 | func 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 | |
| 57 | func testGetPolicy(t *testing.T, e *Enforcer, res [][]string) { |
| 58 | t.Helper() |
nothing calls this directly
no test coverage detected
searching dependent graphs…