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

Function TestFilteredAdapterEmptyFilepath

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

Source from the content-addressed store, hash-verified

187}
188
189func TestFilteredAdapterEmptyFilepath(t *testing.T) {
190 e, _ := NewEnforcer()
191
192 adapter := fileadapter.NewFilteredAdapter("")
193 _ = e.InitWithAdapter("examples/rbac_with_domains_model.conf", adapter)
194
195 if err := e.LoadFilteredPolicy(nil); err != nil {
196 t.Errorf("unexpected error in LoadFilteredPolicy: %v", err)
197 }
198}
199
200func TestFilteredAdapterInvalidFilepath(t *testing.T) {
201 e, _ := NewEnforcer()

Callers

nothing calls this directly

Calls 3

InitWithAdapterMethod · 0.95
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…