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

Function testGetGroupingPolicy

management_api_test.go:99–111  ·  view source on GitHub ↗
(t *testing.T, e *Enforcer, res [][]string)

Source from the content-addressed store, hash-verified

97}
98
99func testGetGroupingPolicy(t *testing.T, e *Enforcer, res [][]string) {
100 t.Helper()
101 myRes, err := e.GetGroupingPolicy()
102 if err != nil {
103 t.Error(err)
104 }
105
106 t.Log("Grouping policy: ", myRes)
107
108 if !util.Array2DEquals(res, myRes) {
109 t.Error("Grouping policy: ", myRes, ", supposed to be ", res)
110 }
111}
112
113func testGetFilteredGroupingPolicy(t *testing.T, e *Enforcer, fieldIndex int, res [][]string, fieldValues ...string) {
114 t.Helper()

Callers 1

TestGetPolicyAPIFunction · 0.85

Calls 3

Array2DEqualsFunction · 0.92
GetGroupingPolicyMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…