(t *testing.T)
| 22 | ) |
| 23 | |
| 24 | func TestInitFilteredAdapter(t *testing.T) { |
| 25 | e, _ := NewEnforcer() |
| 26 | |
| 27 | adapter := fileadapter.NewFilteredAdapter("examples/rbac_with_domains_policy.csv") |
| 28 | _ = e.InitWithAdapter("examples/rbac_with_domains_model.conf", adapter) |
| 29 | |
| 30 | // policy should not be loaded yet |
| 31 | testHasPolicy(t, e, []string{"admin", "domain1", "data1", "read"}, false) |
| 32 | } |
| 33 | |
| 34 | func TestLoadFilteredPolicy(t *testing.T) { |
| 35 | e, _ := NewEnforcer() |
nothing calls this directly
no test coverage detected
searching dependent graphs…