From ca247ecc9dd7430c19dce8c320db922cbb8165de Mon Sep 17 00:00:00 2001 From: f-w Date: Fri, 25 Jun 2021 14:42:56 -0700 Subject: [PATCH] added specs --- src/__tests__/acceptance/notification.acceptance.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/__tests__/acceptance/notification.acceptance.ts b/src/__tests__/acceptance/notification.acceptance.ts index 842dac938..1f773311a 100644 --- a/src/__tests__/acceptance/notification.acceptance.ts +++ b/src/__tests__/acceptance/notification.acceptance.ts @@ -962,6 +962,17 @@ describe('POST /notifications', function () { }); it('should skip broadcast email notification with un-matching filter', async function () { + const origConfig = await app.get(CoreBindings.APPLICATION_CONFIG); + app.bind(CoreBindings.APPLICATION_CONFIG).to( + _.merge({}, origConfig, { + notification: { + broadcastSubscriberChunkSize: 1, + broadcastSubRequestBatchSize: 10, + logSkippedBroadcastPushDispatches: true, + }, + }), + ); + sinon .stub(BaseCrudRepository.prototype, 'isAdminReq') .callsFake(async () => true); @@ -992,6 +1003,8 @@ describe('POST /notifications', function () { }); expect(data.length).equal(1); expect(data[0].state).equal('sent'); + expect(data[0].dispatch?.skipped).containEql('5'); + app.bind(CoreBindings.APPLICATION_CONFIG).to(origConfig); }); it('should update bounce record after sending unicast email notification', async function () {