@abodnar I presume you are on 5.2 and not 5.3? Are you trying to achieve assertPushed() and assertNotPushed()? If so, why not take a look at those methods in 5.3 and see if they give you any ideas?
Oct 25, 2016
3
Level 1
How to unit test the requeue/failure of a job?
I'm working on a job that if it fails I want to make sure it's requeued/released. So while writing up unit tests for it, I wanted to test that the failure logic works appropriately which is to be released back to the queue. I've not seeing anything in 5.2 to do this, but it looks like maybe this is possible 5.3 with https://laravel.com/docs/5.3/mocking#using-job-fakes
Is there a way to assert/validate this occurred?
Please or to participate in this conversation.