(t *testing.T, e *Enforcer, user string, domain string, action string, res []string)
| 846 | } |
| 847 | |
| 848 | func testGetImplicitObjectPatternsForUser(t *testing.T, e *Enforcer, user string, domain string, action string, res []string) { |
| 849 | t.Helper() |
| 850 | myRes, err := e.GetImplicitObjectPatternsForUser(user, domain, action) |
| 851 | if err != nil { |
| 852 | t.Error("Implicit object patterns for ", user, " under domain ", domain, " with action ", action, " could not be fetched: ", err.Error()) |
| 853 | } |
| 854 | t.Log("Implicit object patterns for ", user, " under domain ", domain, " with action ", action, ": ", myRes) |
| 855 | |
| 856 | if !util.SetEquals(res, myRes) { |
| 857 | t.Error("Implicit object patterns for ", user, " under domain ", domain, " with action ", action, ": ", myRes, ", supposed to be ", res) |
| 858 | } |
| 859 | } |
| 860 | |
| 861 | func TestGetImplicitObjectPatternsForUser(t *testing.T) { |
| 862 | // Test with domain pattern model |
no test coverage detected
searching dependent graphs…