Skip to content

Instantly share code, notes, and snippets.

@jrgleason
Created November 29, 2014 01:22
Show Gist options
  • Save jrgleason/850e248188cf2eaedd05 to your computer and use it in GitHub Desktop.
Save jrgleason/850e248188cf2eaedd05 to your computer and use it in GitHub Desktop.
cf.save().success(function (cf) {
request(app)
.post('/crowdfunding/sendConfirmationEmail')
.send({
'id': cf.id,
'text': 'test text'
})
.end(function (err, res) {
assert.equal('PENDING', cf.state);
t.rollback();
done();
});
}).error(function () {
//forget how but fail
t.rollback();
done();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment