Reputation: 1128
The application I am writing has sign up, after a user signs up they receive an email, the email contains an unique URL to the activation link, for example:
Welcome. Click <a href="https://api.app.com/users/{id}/activate/{token}">here</a> to activate your account.
The problem is, I use mocha to automate testing for my restful JSON application I wrote in Node.js (which is the link at the activation url).
What would be a solution for this kind of solution, I mean writing a parser for the user email inbox seems a bit of an overkill to me.
Upvotes: 0
Views: 111
Reputation: 4306
You should write 3 tests
Run this tests separately, don't try to run the full history. Less coupling between your components means better quality. Test you API on one side, test your mail builder on the other.
Upvotes: 1