-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add integration tests for scheduling job
- Loading branch information
1 parent
145944d
commit db23366
Showing
3 changed files
with
22 additions
and
0 deletions.
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
.../learning-content/integration/domain/schedule-create-learning-content-release-job_test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }); | ||
}); | ||
}); |
11 changes: 11 additions & 0 deletions
11
...s/learning-content/integration/domain/schedule-refresh-learning-content-cache-job_test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }); | ||
}); | ||
}); |
File renamed without changes.