Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const emailModel = new Email();
- await emailModel.sendSignupMail(user, 'en');
- let email = new Email();
- beforeEach(() => {
- chai.spy.on(Template.prototype, 'load');
- chai.spy.on(mail, 'sendEmail', () => {});
- stubSendMail = sinon.stub(email, 'sendSignupMail').resolves();
- })
- afterEach(() => {
- chai.spy.restore();
- if (stubSendMail) stubSendMail.restore();
- })
- it('should return a 200 if success', async () => {
- await userLoginController.signup(req, res, next);
- expect(res.statusCode).to.equal(200);
- });
- POST /v2/user/signup
- should return a 200 if success:
- AssertionError: expected 500 to equal 200
- + expected - actual
- -500
- +200
Add Comment
Please, Sign In to add comment