I'm using NodeJS (specifically the SailsJS framework), and am sending an email upon creating a user. I want to verify in a Mocha test case that creating a user sends an email.
I can include something in the JSON response that states whether an email was sent and verify it in that response, but is there a better way? Perhaps some way to intercept the email and verify it?