From 532af07d1b8ab2c55d84c9e151079aa2410eb628 Mon Sep 17 00:00:00 2001 From: Arthur Morrow Date: Fri, 8 Nov 2024 16:01:50 -0500 Subject: [PATCH] fixed issue with updatedOn in officeRepo Jira ticket: CAMS-442 --- .../gateways/mongo/offices.mongo.repository.test.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/backend/functions/lib/adapters/gateways/mongo/offices.mongo.repository.test.ts b/backend/functions/lib/adapters/gateways/mongo/offices.mongo.repository.test.ts index 7eb144332..432dfb8b6 100644 --- a/backend/functions/lib/adapters/gateways/mongo/offices.mongo.repository.test.ts +++ b/backend/functions/lib/adapters/gateways/mongo/offices.mongo.repository.test.ts @@ -62,7 +62,11 @@ describe('offices repo', () => { .mockResolvedValue('inserted-id'); await repo.putOfficeStaff(officeCode, session.user); - expect(replaceOneSpy).toHaveBeenCalledWith(expect.anything(), staff, true); + expect(replaceOneSpy).toHaveBeenCalledWith( + expect.anything(), + { ...staff, updatedOn: expect.anything() }, + true, + ); }); describe('error handling', () => {