Created
September 27, 2017 10:31
-
-
Save amitpatelx/90271cf5f2957618e02ee3cbfce417a1 to your computer and use it in GitHub Desktop.
Check if mail is queued for delivery in rspec
This file contains hidden or 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
mailer_jobs_count = ActionMailer::DeliveryJob.queue_adapter.enqueued_jobs.count{ |x| x[:job] == ActionMailer::DeliveryJob && x[:args].last == feed.id} | |
expect(mailer_jobs_count).to eq 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment