From 7753be298c13072a5ff29d3b41ab86e1d0594d53 Mon Sep 17 00:00:00 2001 From: Oleksandr Tkachuk Date: Fri, 20 Dec 2024 03:04:22 +0200 Subject: [PATCH] update scheduledCronJobs unit test --- src/test/unit/cron-jobs/scheduledCronJobs.spec.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/test/unit/cron-jobs/scheduledCronJobs.spec.js b/src/test/unit/cron-jobs/scheduledCronJobs.spec.js index 3bc41984..ec9fe39f 100644 --- a/src/test/unit/cron-jobs/scheduledCronJobs.spec.js +++ b/src/test/unit/cron-jobs/scheduledCronJobs.spec.js @@ -1,9 +1,13 @@ const { checkUsersForLastLogin } = require('~/cron-jobs/checkForLastLogin') const { removeUnverifiedUsers } = require('~/cron-jobs/removeUnverifiedUsers') +const { openScheduledCooperationResources } = require('~/cron-jobs/openScheduledCooperationResources') const scheduledCronJobs = require('~/cron-jobs/scheduledCronJobs') jest.mock('~/cron-jobs/checkForLastLogin', () => ({ checkUsersForLastLogin: { start: jest.fn() } })) jest.mock('~/cron-jobs/removeUnverifiedUsers', () => ({ removeUnverifiedUsers: { start: jest.fn() } })) +jest.mock('~/cron-jobs/openScheduledCooperationResources', () => ({ + openScheduledCooperationResources: { start: jest.fn() } +})) describe('scheduledCronJobs', () => { it('should call all the cron jobs', () => { @@ -11,5 +15,6 @@ describe('scheduledCronJobs', () => { expect(removeUnverifiedUsers.start).toHaveBeenCalled() expect(checkUsersForLastLogin.start).toHaveBeenCalled() + expect(openScheduledCooperationResources.start).toHaveBeenCalled() }) })