Add tests for the mails controller