(t *testing.T, model model.Model, expected int, sec string, ptype string, tag string)
| 27 | } |
| 28 | |
| 29 | func testRuleCount(t *testing.T, model model.Model, expected int, sec string, ptype string, tag string) { |
| 30 | t.Helper() |
| 31 | |
| 32 | ruleCount := len(model[sec][ptype].Policy) |
| 33 | if ruleCount != expected { |
| 34 | t.Errorf("[%s] rule count: %d, expected %d", tag, ruleCount, expected) |
| 35 | } |
| 36 | } |
| 37 | |
| 38 | func TestDuplicateRuleInAdapter(t *testing.T) { |
| 39 | e, _ := casbin.NewEnforcer("../examples/basic_model.conf") |
no outgoing calls
no test coverage detected
searching dependent graphs…