We can display the relations that were not checked directly in tests, directly or indirectly, and report if there were tests for which the relation returned allowed = true, and allowed = false, as tests should cover both.
For example, for the tests below:
model: |
model
schema 1.1
type user
type document
relations
define viewer : [user]
define writer : [user]
define can_view : viewer or writer
define can_edit: writer
tuples:
- user: user:anne
relation: viewer
object: document:1
tests:
- check:
- user : user:anne
object : document:1
assertions:
can_view : true
We could report that the relation can_edit and writer were not covered at all, and the viewer, can_view were only tested for positive results.
We can display the relations that were not checked directly in tests, directly or indirectly, and report if there were tests for which the relation returned allowed = true, and allowed = false, as tests should cover both.
For example, for the tests below:
We could report that the relation
can_edit
andwriter
were not covered at all, and theviewer
,can_view
were only tested for positive results.