From 152ed99727acd44792c5603e7ff10d2df159431a Mon Sep 17 00:00:00 2001 From: MartinBraquet Date: Mon, 26 Jan 2026 23:32:21 +0100 Subject: [PATCH] Fix test 2 --- backend/api/tests/unit/update-options.unit.test.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/backend/api/tests/unit/update-options.unit.test.ts b/backend/api/tests/unit/update-options.unit.test.ts index 16142f6..2b32fc3 100644 --- a/backend/api/tests/unit/update-options.unit.test.ts +++ b/backend/api/tests/unit/update-options.unit.test.ts @@ -96,7 +96,7 @@ describe('updateOptions', () => { it('should throw if the table param is invalid', async () => { const mockProps = { table: 'causes' as const, - names: ["mockNamesOne", "mockNamesTwo"] + values: ["mockNamesOne", "mockNamesTwo"] }; const mockAuth = { uid: '321' } as AuthedUser; const mockReq = {} as any; @@ -111,7 +111,7 @@ describe('updateOptions', () => { it('should throw if the names param is not provided', async () => { const mockProps = { table: 'causes' as const, - names: [] + values: undefined }; const mockAuth = { uid: '321' } as AuthedUser; const mockReq = {} as any; @@ -120,13 +120,13 @@ describe('updateOptions', () => { expect(updateOptions(mockProps, mockAuth, mockReq)) .rejects - .toThrow('No names provided'); + .toThrow('No ids provided'); }); it('should throw if unable to find profile', async () => { const mockProps = { table: 'causes' as const, - names: ["mockNamesOne", "mockNamesTwo"] + values: ["mockNamesOne", "mockNamesTwo"] }; const mockAuth = { uid: '321' } as AuthedUser; const mockReq = {} as any; @@ -142,7 +142,7 @@ describe('updateOptions', () => { it('should update user', async () => { const mockProps = { table: 'causes' as const, - names: ["mockNamesOne", "mockNamesTwo"] + values: ["mockNamesOne", "mockNamesTwo"] }; const mockAuth = { uid: '321' } as AuthedUser; const mockReq = {} as any;