Skip to content

Commit 9e56ee4

Browse files
committed
typos
1 parent 64a57dc commit 9e56ee4

File tree

4 files changed

+8
-11
lines changed

4 files changed

+8
-11
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1539,7 +1539,7 @@ describe('templateClient', () => {
15391539
expect(result).toEqual({
15401540
error: {
15411541
code: 403,
1542-
message: 'UserWithOptionalClient cannot request a proof',
1542+
message: 'User cannot request a proof',
15431543
},
15441544
});
15451545
});
@@ -1813,7 +1813,7 @@ describe('templateClient', () => {
18131813
expect(result).toEqual({
18141814
error: {
18151815
code: 403,
1816-
message: 'UserWithOptionalClient cannot request a proof',
1816+
message: 'User cannot request a proof',
18171817
},
18181818
});
18191819
});

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

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -374,14 +374,11 @@ export class TemplateClient {
374374
if (!clientConfig?.features.proofing) {
375375
log.error({
376376
code: ErrorCase.FEATURE_DISABLED,
377-
description: 'UserWithOptionalClient cannot request a proof',
377+
description: 'User cannot request a proof',
378378
clientConfig,
379379
});
380380

381-
return failure(
382-
ErrorCase.FEATURE_DISABLED,
383-
'UserWithOptionalClient cannot request a proof'
384-
);
381+
return failure(ErrorCase.FEATURE_DISABLED, 'User cannot request a proof');
385382
}
386383

387384
const proofRequestUpdateResult =

tests/test-team/template-mgmt-api-tests/request-proof.api.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ test.describe('POST /v1/template/:templateId/proof', () => {
228228
});
229229
});
230230

231-
test('returns 403 - user without a client cannot request a proof', async ({
231+
test('returns 400 - user without a client cannot request a proof', async ({
232232
request,
233233
}) => {
234234
const templateId = randomUUID();
@@ -237,8 +237,8 @@ test.describe('POST /v1/template/:templateId/proof', () => {
237237
const template = {
238238
...TemplateFactory.createLetterTemplate(
239239
templateId,
240-
userProofingEnabled,
241-
'userProofingEnabledtemplate',
240+
userWithoutClient,
241+
'userWithoutClientTemplate',
242242
// template should not reach this status if proofing is not
243243
// enabled for the client
244244
'PENDING_PROOF_REQUEST'

utils/utils/src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,13 +137,13 @@ export type ProofingRequest = {
137137
campaignId: string;
138138
language: Language;
139139
letterType: LetterType;
140-
user: User;
141140
pdfVersionId: string;
142141
personalisationParameters: string[];
143142
supplier: string;
144143
templateId: string;
145144
templateName: string;
146145
testDataVersionId?: string;
146+
user: User;
147147
};
148148

149149
export type User = { userId: string; clientId: string };

0 commit comments

Comments
 (0)