[feature] Add lightweight authorization test helpers
Open
enhancement
- Dominant language
- Go
- Stars
- 20.4k
- Forks
- 1.8k
- Avg merge
- 5d 11h
- Merged PRs (30d)
- 2
Description
## Background
Testing authorization behavior with Casbin often results in repetitive `Enforce` assertions with limited failure context.
### Proposal
Introduce a small set of authorization test helper functions as an external package.
Example:
```go
authztest.AssertAllow(t, e, "alice", "data1", "read")
authztest.AssertDeny(t, e, "bob", "data1", "write")
```
### Design Notes
* Helpers are thin wrappers around `Enforce`
Contributor guide
Assessment
This issue has not been assessed yet.