-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement
rivertest.RequireNotInserted
test helper (inverse of `Req…
…uireInserted`) (#237) Here, introduce a new test helper for `rivertest.RequireNotInserted`, which fails in cases where a job matching in the input kind and (optional) properties _was_ inserted rather than was not. Its purpose is to invert the checks made by the existing `RequireInserted`. Unlike `RequireInserted`, I _didn't_ implement a batch version of the helper like `RequireNotInsertedMany`. I was going to do it, but after thinking about it for a while, I don't think it really makes sense. `RequireInsertedMany` is useful because it allows you to verify a sequence of job inserts that occurred in a particular order with particular options. There's no sequence for jobs that weren't inserted, so the only thing a `RequireNotInsertedMany` would do is verify that many different job kinds were all not inserted as part of one operation, which doesn't really seem that useful. I figure if there's demand we can think about adding a batch helper, but it may be better to not do so prospectively to keep the API smaller, and avoiding adding a function that doesn't end up getting any use.
- Loading branch information
Showing
3 changed files
with
583 additions
and
132 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Oops, something went wrong.