I\'m working on a reset_password method in a Rails API app. When this endpoint is hit, an ActiveJob is queued that will fire off a request to Mandrill (our transactional email c
In my opinion, ensure a job was enqueued when a request is performed is important. You can do it with the below solutions:
expect{ post your_api_here, params: params, headers: headers }
.to have_enqueued_job(YourJob)
.with(args)
expect(YourJob).to receive(:perform_later).once.with(args)
post your_api_here, params: params, headers: headers