Testing code after this.unblock();

I’m sending emails using Mandrill, and each of the calls to its API are after a call to this.unblock();.

My problem is simple, how do you test this kind of code? I’m using a test API key that doesn’t actually send emails, but my method updates my collection once I get a response, I’d like to test that this is done.

A method with this.unlock() will work the same way as a normal method (but it does not block the execution of the subsequent methods). You test it as you would test any other method.

What problem are you facing?