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

Function TestUnsupportedFilteredPolicy

filter_test.go:177–187  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

175}
176
177func TestUnsupportedFilteredPolicy(t *testing.T) {
178 e, _ := NewEnforcer("examples/rbac_with_domains_model.conf", "examples/rbac_with_domains_policy.csv")
179
180 err := e.LoadFilteredPolicy(&fileadapter.Filter{
181 P: []string{"", "domain1"},
182 G: []string{"", "", "domain1"},
183 })
184 if err == nil {
185 t.Errorf("encorcer should have reported incompatibility error")
186 }
187}
188
189func TestFilteredAdapterEmptyFilepath(t *testing.T) {
190 e, _ := NewEnforcer()

Callers

nothing calls this directly

Calls 2

LoadFilteredPolicyMethod · 0.95
NewEnforcerFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…