Skip to content

Commit

Permalink
Squashed 'compatibility-suite/pact-compatibility-suite/' changes from…
Browse files Browse the repository at this point in the history
… a0381bce1..88a21014d

88a21014d chore: Correct V3 content type matcher scenarios

git-subtree-dir: compatibility-suite/pact-compatibility-suite
git-subtree-split: 88a21014deafc72e4d53300632f0cfbd9d46fc98
  • Loading branch information
rholshausen committed Aug 11, 2023
1 parent c37387f commit 541fdd2
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -216,21 +216,21 @@ Feature: V3 era Matching Rules

Scenario: Supports a ContentType matcher (positive case)
Given an expected request configured with the following:
| body | matching rules |
| file: rat.jpg | contenttype-matcher-v3.json |
| content type | body | matching rules |
| application/octet-stream | file: rat.jpg | contenttype-matcher-v3.json |
And a request is received with the following:
| body |
| file: spider.jpg |
| content type | body |
| application/octet-stream | file: spider.jpg |
When the request is compared to the expected one
Then the comparison should be OK

Scenario: Supports a ContentType matcher (negative case)
Given an expected request configured with the following:
| body | matching rules |
| file: rat.jpg | contenttype-matcher-v3.json |
| content type | body | matching rules |
| application/octet-stream | file: rat.jpg | contenttype-matcher-v3.json |
And a request is received with the following:
| body |
| file: sample.pdf |
| content type | body |
| application/octet-stream | file: sample.pdf |
When the request is compared to the expected one
Then the comparison should NOT be OK
And the mismatches will contain a mismatch with error "$" -> "Expected binary contents to have content type 'image/jpeg' but detected contents was 'application/pdf'"
Expand Down

0 comments on commit 541fdd2

Please sign in to comment.