-
-
Notifications
You must be signed in to change notification settings - Fork 312
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add testing option to count the number of matched messages #26
Comments
I've thought about this a bit today and I believe both #25 and #26 can be accomplished with the addition of a # Make an assertion that there is a single job with the args `%{id: 1}`
assert [%{args: %{id: 1}}] = get_enqueued(worker: MyWorker, queue: "foobar")
# Make an assertion that there is exactly one matching job
assert [%Oban.Job{}] = get_enqueued(worker: MyWorker, queue: "foobar") This is flexible and allows you to make any assertions that you like in your tests. |
That sounds very fine |
Thanks, this is perfect. I've already tested it, and it works great. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In my test I sometimes want to check that there is only one message enqueued and not more. A method to test for this would be great.
The text was updated successfully, but these errors were encountered: