Fixed names of tests for Portal honeypot field

ref KTLO-1
This commit is contained in:
Sam Lord 2024-08-22 20:16:02 +01:00 committed by Sam Lord
parent 0a9d2fadba
commit 56a9fa34af

View File

@ -422,17 +422,17 @@ describe('RouterController', function () {
it('Sends emails when honeypot is not filled', async function () { it('Sends emails when honeypot is not filled', async function () {
const controller = createRouterController(); const controller = createRouterController();
req.body.honeypot = 'filled!';
await controller.sendMagicLink(req, res).should.be.fulfilled(); await controller.sendMagicLink(req, res).should.be.fulfilled();
sendEmailWithMagicLinkStub.notCalled.should.be.true(); sendEmailWithMagicLinkStub.calledOnce.should.be.true();
}); });
it('Does not send emails when honeypot is filled', async function () { it('Does not send emails when honeypot is filled', async function () {
const controller = createRouterController(); const controller = createRouterController();
req.body.honeypot = 'filled!';
await controller.sendMagicLink(req, res).should.be.fulfilled(); await controller.sendMagicLink(req, res).should.be.fulfilled();
sendEmailWithMagicLinkStub.calledOnce.should.be.true(); sendEmailWithMagicLinkStub.notCalled.should.be.true();
}); });
}); });
}); });