MCPcopy
hub / github.com/apache/casbin / TestBasicModelWithoutUsers

Function TestBasicModelWithoutUsers

model_test.go:124–131  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

122}
123
124func TestBasicModelWithoutUsers(t *testing.T) {
125 e, _ := NewEnforcer("examples/basic_without_users_model.conf", "examples/basic_without_users_policy.csv")
126
127 testEnforceWithoutUsers(t, e, "data1", "read", true)
128 testEnforceWithoutUsers(t, e, "data1", "write", false)
129 testEnforceWithoutUsers(t, e, "data2", "read", false)
130 testEnforceWithoutUsers(t, e, "data2", "write", true)
131}
132
133func TestBasicModelWithoutResources(t *testing.T) {
134 e, _ := NewEnforcer("examples/basic_without_resources_model.conf", "examples/basic_without_resources_policy.csv")

Callers

nothing calls this directly

Calls 2

NewEnforcerFunction · 0.85
testEnforceWithoutUsersFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…