Fixed a typo in the test and fixed the code to make it pass. Cloudmailin...

... doesn't pass attachments at all if there aren't any so I decided it should be an empty array in this case.