Skip to content

Commit

Permalink
add integration tests for scheduling job
Browse files Browse the repository at this point in the history
  • Loading branch information
laura-bergoens committed Nov 28, 2024
1 parent 145944d commit db23366
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { LcmsCreateReleaseJob } from '../../../../src/learning-content/domain/models/LcmsCreateReleaseJob.js';
import { usecases } from '../../../../src/learning-content/domain/usecases/index.js';
import { expect } from '../../../test-helper.js';

describe('Learning Content | Integration | Domain | Use case | scheduleCreateLearningContentReleaseJob', function () {
it('should schedule the job', async function () {
await usecases.scheduleCreateLearningContentReleaseJob({ userId: 123 });

await expect(LcmsCreateReleaseJob.name).to.have.been.performed.withJobPayload({ userId: 123 });
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { LcmsRefreshCacheJob } from '../../../../src/learning-content/domain/models/LcmsRefreshCacheJob.js';
import { usecases } from '../../../../src/learning-content/domain/usecases/index.js';
import { expect } from '../../../test-helper.js';

describe('Learning Content | Integration | Domain | Use case | scheduleRefreshLearningContentCacheJob', function () {
it('should schedule the job', async function () {
await usecases.scheduleRefreshLearningContentCacheJob({ userId: 123 });

await expect(LcmsRefreshCacheJob.name).to.have.been.performed.withJobPayload({ userId: 123 });
});
});

0 comments on commit db23366

Please sign in to comment.