camcorder
camcorder copied to clipboard
What methods need to be used with `methods_with_side_effects`
I'm struggling to get this to work how I'd expect.
I have one ActiveJob
that loops through emails in an inbox, finds a record based on the contents of each email, performs a state machine transition on the record and then moves that email to an 'Archive' folder via uid_copy
and uid_store
. After the loop has finished, the job calls imap.expunge
, imap.logout
and imap.disconnect
.
The problem is that I need to run multiple tests for this worker, but the first time it runs it is archiving all mail and fails on subsequent tests.
How would I record once and perform multiple test?