(t *testing.T)
| 295 | } |
| 296 | |
| 297 | func TestAllMatchingFunc(t *testing.T) { |
| 298 | rm := NewRoleManager(10) |
| 299 | rm.AddMatchingFunc("keyMatch2", util.KeyMatch2) |
| 300 | rm.AddDomainMatchingFunc("keyMatch2", util.KeyMatch2) |
| 301 | |
| 302 | _ = rm.AddLink("/book/:id", "book_group", "*") |
| 303 | // Current role inheritance tree after deleting the links: |
| 304 | // *:book_group |
| 305 | // | |
| 306 | // *:/book/:id |
| 307 | testDomainRole(t, rm, "/book/1", "book_group", "domain1", true) |
| 308 | testDomainRole(t, rm, "/book/2", "book_group", "domain1", true) |
| 309 | } |
| 310 | |
| 311 | func TestMatchingFuncOrder(t *testing.T) { |
| 312 | rm := NewRoleManager(10) |
nothing calls this directly
no test coverage detected
searching dependent graphs…