More code examples#895
Conversation
Adds more examples to the README plus corresponding tests for: * custom functions * authz style expressions Also reorganize the README to improve consumability.
XN137
left a comment
There was a problem hiding this comment.
looks like a net-positive with minor comments (feel free to ignore)
| .withLibraries(new AttributeLibrary("prod")) | ||
| .build(); | ||
|
|
||
| assertThat(grants(script, Collections.emptyMap())).isFalse(); |
There was a problem hiding this comment.
this seems to be another case where we collapse exceptions to false, but the behavior could be tested more accurately by asserting the exception.
I understand that in a real "grants" implementation you would want to collapse to "false" in those cases, but not sure about testing.
There was a problem hiding this comment.
thanks for the update.
we seem to have kept the isFalse assertions, which now basically only tests that our grants implementation, collapses exceptions to false
| .withLibraries(new AttributeLibrary("prod")) | ||
| .build(); | ||
|
|
||
| assertThat(grants(script, Collections.emptyMap())).isFalse(); |
There was a problem hiding this comment.
thanks for the update.
we seem to have kept the isFalse assertions, which now basically only tests that our grants implementation, collapses exceptions to false
Adds more examples to the README plus corresponding tests for:
Also reorganize the README to improve consumability.