Closed vpratfr closed 1 month ago
see this code of it works for you:
pest test code example
use Illuminate\Bus\ChainedBatch;
use Lorisleiva\Actions\Decorators\JobDecorator;
use Illuminate\Support\Facades\Bus;
it('dispatches jobs', function () {
Bus::fake();
Bus::assertChained([
function (JobDecorator $job) {
expect($job->getAction())->toBeInstanceOf(FooAction::class);
return $job;
},
]);
});
Closing due to inactivity. If you feel your issue is still relevant please open a new one with a link to a repository containing a minimal reproducible example.
Hi,
I got an action which dispatches jobs (which are actions too, hurray). Looks like that:
and is tested nicely with that
Moving to batches
I wanted to move to batches. So I did that :
However now my test is failing and saying that no jobs have been dispatched.
Any advices on how to test that?