Skip to content

Commit 85ac530

Browse files
committed
comments, cleanup
1 parent 86d9579 commit 85ac530

File tree

2 files changed

+2
-34
lines changed

2 files changed

+2
-34
lines changed

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

Lines changed: 1 addition & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -659,7 +659,7 @@ describe('templateClient', () => {
659659
}
660660
);
661661

662-
test('should return a failure result client configuration unexpectedly cant be fetched', async () => {
662+
test('should return a failure result if client configuration unexpectedly cant be fetched', async () => {
663663
const { templateClient, mocks } = setup();
664664

665665
const data: CreateUpdateTemplate = {
@@ -1787,38 +1787,6 @@ describe('templateClient', () => {
17871787
});
17881788
});
17891789

1790-
test('should return a failure result, when proofing is not enabled', async () => {
1791-
const { templateClient, mocks } = setup();
1792-
1793-
mocks.clientConfigRepository.get.mockResolvedValueOnce({
1794-
data: {
1795-
campaignId: 'campaignId',
1796-
features: {
1797-
proofing: false,
1798-
},
1799-
},
1800-
});
1801-
1802-
const result = await templateClient.requestProof(templateId, user);
1803-
1804-
expect(mocks.clientConfigRepository.get).toHaveBeenCalledWith(
1805-
user.clientId
1806-
);
1807-
1808-
expect(
1809-
mocks.templateRepository.proofRequestUpdate
1810-
).not.toHaveBeenCalled();
1811-
1812-
expect(mocks.queueMock.send).not.toHaveBeenCalled();
1813-
1814-
expect(result).toEqual({
1815-
error: {
1816-
code: 403,
1817-
message: 'User cannot request a proof',
1818-
},
1819-
});
1820-
});
1821-
18221790
test('should return a failure result, when user has no clientId (so proofing cannot be determined to be enabled)', async () => {
18231791
const { templateClient, mocks } = setup();
18241792

lambdas/backend-api/src/__tests__/templates/infra/client-config-repository.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ describe('ClientConfigRepository', () => {
366366
expect(cache.set).toHaveBeenCalledWith(mockKey, validClient);
367367
});
368368

369-
it('caches non-existance of configuration parameter', async () => {
369+
it('caches non-existence of configuration parameter', async () => {
370370
const {
371371
mocks: { ssmClient, cache },
372372
} = setup();

0 commit comments

Comments
 (0)