chore: finishing unit tests for a couple of services (#13292)

This commit is contained in:
Daniel Dietzler
2024-10-08 23:08:49 +02:00
committed by GitHub
parent f5e0cdedbc
commit 9d0f03808c
17 changed files with 386 additions and 8 deletions

View File

@@ -583,6 +583,12 @@ describe(AssetService.name, () => {
});
describe('run', () => {
it('should run the refresh faces job', async () => {
accessMock.asset.checkOwnerAccess.mockResolvedValue(new Set(['asset-1']));
await sut.run(authStub.admin, { assetIds: ['asset-1'], name: AssetJobName.REFRESH_FACES });
expect(jobMock.queueAll).toHaveBeenCalledWith([{ name: JobName.FACE_DETECTION, data: { id: 'asset-1' } }]);
});
it('should run the refresh metadata job', async () => {
accessMock.asset.checkOwnerAccess.mockResolvedValue(new Set(['asset-1']));
await sut.run(authStub.admin, { assetIds: ['asset-1'], name: AssetJobName.REFRESH_METADATA });