Skip to content

Commit 724d6fd

Browse files
committed
CCM-15633: Update pact test to use new example from core
1 parent 86adb6b commit 724d6fd

2 files changed

Lines changed: 4 additions & 11 deletions

File tree

tests/pact-tests/consumer/channel-status-published.consumer.pact.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ describe('Pact message consumer - ChannelStatusPublished event', () => {
5050
/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z$/,
5151
createdEvent.data.timestamp,
5252
),
53-
supplierStatus: 'paperletteroptedout',
53+
supplierStatus: 'paper_letter_opted_out',
5454
},
5555
dataschema: MatchersV3.regex(
5656
/^https:\/\/notify\.nhs\.uk\/cloudevents\/schemas\/messaging\/channel-status\.published\.\d+\.\d+\.\d+\.schema\.json$/,

tests/pact-tests/pact-verification/channel-status-published.provider.pact.test.ts

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { MessageProviderPact } from '@pact-foundation/pact';
22

3-
import ChannelStatusPublishedEventCreated from '@nhsdigital/nhs-notify-event-schemas-status-published/examples/ChannelStatusPublishedEvent/v1/created.json';
3+
import ChannelStatusPublishedEventPaperLetterOptedOut from '@nhsdigital/nhs-notify-event-schemas-status-published/examples/ChannelStatusPublishedEvent/v1/paper_letter_opted_out.json';
44

55
import {
66
PACT_FILE,
@@ -14,15 +14,8 @@ describe('Channel status published provider tests', () => {
1414
provider: PACT_PROVIDER,
1515
pactUrls: [PACT_FILE],
1616
messageProviders: {
17-
[PACT_MESSAGE_DESCRIPTION]: () => ({
18-
// This should be updated to an example with the paperletteroptedout supplier
19-
// status from schemas package, once we've updated core.
20-
...ChannelStatusPublishedEventCreated,
21-
data: {
22-
...ChannelStatusPublishedEventCreated.data,
23-
supplierStatus: 'paperletteroptedout',
24-
},
25-
}),
17+
[PACT_MESSAGE_DESCRIPTION]: () =>
18+
ChannelStatusPublishedEventPaperLetterOptedOut,
2619
},
2720
logLevel: 'error',
2821
});

0 commit comments

Comments
 (0)