(t *testing.T)
| 374 | } |
| 375 | |
| 376 | func TestGetAndSetModel(t *testing.T) { |
| 377 | e, _ := NewEnforcer("examples/basic_model.conf", "examples/basic_policy.csv") |
| 378 | e2, _ := NewEnforcer("examples/basic_with_root_model.conf", "examples/basic_policy.csv") |
| 379 | |
| 380 | testEnforce(t, e, "root", "data1", "read", false) |
| 381 | |
| 382 | e.SetModel(e2.GetModel()) |
| 383 | |
| 384 | testEnforce(t, e, "root", "data1", "read", true) |
| 385 | } |
| 386 | |
| 387 | func TestGetAndSetAdapterInMem(t *testing.T) { |
| 388 | e, _ := NewEnforcer("examples/basic_model.conf", "examples/basic_policy.csv") |
nothing calls this directly
no test coverage detected
searching dependent graphs…