Moved over tests. Need to work out dependencies on trigger_mail.