Skip to content

Commit

Permalink
DOP-4498 removed looking for value from response
Browse files Browse the repository at this point in the history
  • Loading branch information
Caesar Bell committed May 3, 2024
1 parent e9d91a8 commit b50f2f3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/unit/repositories/jobRepository.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,11 @@ describe('Job Repository Tests', () => {

test('getOneQueuedJobAndUpdate succeeds', async () => {
const testData = TestDataProvider.getFindOneAndUpdateCallInfo();
const mockVal = { value: getBuildJobPlain() };
const mockVal = getBuildJobPlain();
jest.spyOn(jobRepo, 'notify').mockResolvedValueOnce(true);
dbRepoHelper.collection.findOneAndUpdate.mockResolvedValueOnce(mockVal);

await expect(jobRepo.getOneQueuedJobAndUpdate()).resolves.toEqual(mockVal.value);
await expect(jobRepo.getOneQueuedJobAndUpdate()).resolves.toEqual(mockVal);
expect(dbRepoHelper.collection.findOneAndUpdate).toBeCalledTimes(1);
expect(dbRepoHelper.collection.findOneAndUpdate).toBeCalledWith(
testData.query,
Expand Down

0 comments on commit b50f2f3

Please sign in to comment.