From 56a9fa34afc4d2f3ce6f8428da1ce155169974bf Mon Sep 17 00:00:00 2001 From: Sam Lord Date: Thu, 22 Aug 2024 20:16:02 +0100 Subject: [PATCH] Fixed names of tests for Portal honeypot field ref KTLO-1 --- .../members-api/test/unit/lib/controllers/router.test.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ghost/members-api/test/unit/lib/controllers/router.test.js b/ghost/members-api/test/unit/lib/controllers/router.test.js index 95bc8e8c5e..fe6b9559d8 100644 --- a/ghost/members-api/test/unit/lib/controllers/router.test.js +++ b/ghost/members-api/test/unit/lib/controllers/router.test.js @@ -422,17 +422,17 @@ describe('RouterController', function () { it('Sends emails when honeypot is not filled', async function () { const controller = createRouterController(); - req.body.honeypot = 'filled!'; - 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 () { const controller = createRouterController(); + req.body.honeypot = 'filled!'; + await controller.sendMagicLink(req, res).should.be.fulfilled(); - sendEmailWithMagicLinkStub.calledOnce.should.be.true(); + sendEmailWithMagicLinkStub.notCalled.should.be.true(); }); }); });