Skip to content

Commit 6f6d4de

Browse files
committed
init
1 parent 9a23c16 commit 6f6d4de

File tree

11 files changed

+129
-1053
lines changed

11 files changed

+129
-1053
lines changed

lambdas/backend-api/src/__tests__/templates/api/validate-letter-template-files.test.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,10 @@ describe('guard duty handler', () => {
103103

104104
await handler(event);
105105

106-
expect(mocks.templateRepository.get).toHaveBeenCalledWith(templateId, {
107-
clientId: clientId,
108-
});
106+
expect(mocks.templateRepository.get).toHaveBeenCalledWith(
107+
templateId,
108+
clientId
109+
);
109110

110111
expect(mocks.letterUploadRepository.download).toHaveBeenCalledWith(
111112
templateId,
@@ -354,9 +355,10 @@ describe('guard duty handler', () => {
354355

355356
await handler(event);
356357

357-
expect(mocks.templateRepository.get).toHaveBeenCalledWith(templateId, {
358-
clientId,
359-
});
358+
expect(mocks.templateRepository.get).toHaveBeenCalledWith(
359+
templateId,
360+
clientId
361+
);
360362

361363
expect(mocks.letterUploadRepository.download).toHaveBeenCalledTimes(1);
362364
expect(mocks.letterUploadRepository.download).toHaveBeenCalledWith(

lambdas/backend-api/src/__tests__/templates/app/template-client.test.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1327,7 +1327,7 @@ describe('templateClient', () => {
13271327

13281328
expect(mocks.templateRepository.get).toHaveBeenCalledWith(
13291329
templateId,
1330-
user
1330+
user.clientId
13311331
);
13321332

13331333
expect(result).toEqual({
@@ -1368,7 +1368,7 @@ describe('templateClient', () => {
13681368

13691369
expect(mocks.templateRepository.get).toHaveBeenCalledWith(
13701370
templateId,
1371-
user
1371+
user.clientId
13721372
);
13731373

13741374
expect(result).toEqual({
@@ -1403,7 +1403,7 @@ describe('templateClient', () => {
14031403

14041404
expect(mocks.templateRepository.get).toHaveBeenCalledWith(
14051405
templateId,
1406-
user
1406+
user.clientId
14071407
);
14081408

14091409
expect(result).toEqual({
@@ -1427,7 +1427,7 @@ describe('templateClient', () => {
14271427

14281428
const result = await templateClient.listTemplates(user);
14291429

1430-
expect(mocks.templateRepository.list).toHaveBeenCalledWith(user);
1430+
expect(mocks.templateRepository.list).toHaveBeenCalledWith(user.clientId);
14311431

14321432
expect(result).toEqual({
14331433
error: {
@@ -1472,7 +1472,7 @@ describe('templateClient', () => {
14721472

14731473
const result = await templateClient.listTemplates(user);
14741474

1475-
expect(mocks.templateRepository.list).toHaveBeenCalledWith(user);
1475+
expect(mocks.templateRepository.list).toHaveBeenCalledWith(user.clientId);
14761476

14771477
expect(result).toEqual({
14781478
data: [template],
@@ -1499,7 +1499,7 @@ describe('templateClient', () => {
14991499

15001500
const result = await templateClient.listTemplates(user);
15011501

1502-
expect(mocks.templateRepository.list).toHaveBeenCalledWith(user);
1502+
expect(mocks.templateRepository.list).toHaveBeenCalledWith(user.clientId);
15031503

15041504
expect(result).toEqual({
15051505
data: [template],

0 commit comments

Comments
 (0)