Add some simple minded tests for the mail job
Wrap the delayed job work in a transaction