Move mailer tests from frontend to core