Skip to content

Commit 931488f

Browse files
committed
Correct tests
1 parent 25896ae commit 931488f

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

src/__mocks__/terminalApi/sync.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ export const syncResEventNotificationWithUnknownEnum = {
412412
"SaleToPOIRequest":{
413413
"EventNotification":{
414414
"EventDetails":"newstate=IDLE&oldstate=START",
415-
"EventToNotify":"This is unknown",
415+
"EventToNotify":"this is unknown",
416416
"TimeStamp":"2019-08-07T10:16:10.000Z"
417417
},
418418
"MessageHeader":{

src/__tests__/legalEntityManagement.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ describe("Legal Entity Management", (): void => {
8989
await expect(async () => {
9090
const response = await legalEntityManagement.LegalEntitiesApi.getLegalEntity("123456789");
9191
expect(response.id).toBe(id);
92-
// type is unknown, so it should not be defined
93-
expect(response.type).toBeUndefined();
92+
// type is unknown, so it holds whatever value is found in the payload
93+
expect(response.type).toBe("this is unknown");
9494
}).not.toThrow();
9595
});
9696

src/__tests__/terminalCloudAPI.spec.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,9 @@ describe("Terminal Cloud API", (): void => {
9191
await expect(async () => {
9292
const terminalAPIResponse = await terminalCloudAPI.sync(terminalAPIPaymentRequest);
9393
expect(terminalAPIResponse.SaleToPOIRequest?.EventNotification).toBeDefined();
94-
expect(terminalAPIResponse.SaleToPOIRequest?.EventNotification?.EventToNotify).toBeUndefined();
94+
// EventToNotify is unknown, so it holds whatever value is found in the payload
95+
expect(terminalAPIResponse.SaleToPOIRequest?.EventNotification?.EventToNotify).toBe("this is unknown");
96+
9597
}).not.toThrow();
9698
});
9799

0 commit comments

Comments
 (0)