Skip to content

Commit 8efd6c7

Browse files
committed
feat: Use content type matching rule for V3 message's binary body
1 parent 1acfa1e commit 8efd6c7

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

features/V3/message_provider.feature

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,16 +86,20 @@ Feature: Message provider
8686

8787
Scenario: Message with binary body (positive case)
8888
Given a provider is started that can generate the "image" message with "file: rat.jpg"
89-
And a Pact file for "image":"file: rat.jpg" is to be verified
89+
And a Pact file for "image" is to be verified with the following:
90+
| body | file: spider.jpg |
91+
| matching rules | contenttype-matcher-v3.json |
9092
When the verification is run
9193
Then the verification will be successful
9294

9395
Scenario: Message with binary body (negative case)
9496
Given a provider is started that can generate the "image" message with "file: rat.jpg"
95-
And a Pact file for "image":"file: spider.jpg" is to be verified
97+
And a Pact file for "image" is to be verified with the following:
98+
| body | file: sample.pdf |
99+
| matching rules | contenttype-matcher-v3.json |
96100
When the verification is run
97101
Then the verification will NOT be successful
98-
And the verification results will contain a "Body had differences" error
102+
And the verification results will contain a "Body type had differences" error
99103

100104
Scenario: Supports matching rules for the message metadata (positive case)
101105
Given a provider is started that can generate the "basic" message with "file: basic.json" and the following metadata:

0 commit comments

Comments
 (0)