Cover the refresh branch and four more refusals - #726
Merged
Conversation
Refreshing an authorisation is a different persistence path from editing one: the token is regenerated and the vault re-encrypted, through two updates keyed on the user rather than the single one an edit makes. The response text is the same either way, so the branch is told apart by which queries actually ran. The rest are refusals that had nothing on them: creating a custom field or a preset without permission, viewing a field definition that has been deleted, and a database failure while saving a field or while loading the pickers a preset form needs — each reported rather than escaping as an unhandled error. The permission denials are unit-shaped by necessity: the integration harness's ACL always says yes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
7 tests closing the last gaps in four controllers.
The refresh branch
Refreshing an authorisation is a different persistence path from editing one: the token is regenerated and the vault re-encrypted, through two updates keyed on the user rather than the single one a plain edit makes. The response text is identical either way, so the test tells the branch apart by which queries actually ran — which is the only thing that distinguishes them from outside.
Four refusals
Testing
Integration: 50 tests green across the three classes, no deprecations or notices. All four controllers are now fully covered, and no gap in them turned out to be an accessor or an unreachable branch.