BodyTypeMismatch
is thrown for multipart requests with different boundary attributes
#482
Labels
bug
Indicates an unexpected problem or unintended behavior
Given the test below, the following mismatches will be generated:
Mismatches
Test
Uncommenting the
SetBoundary
methods will cause the test setup and HTTP calls to have the same boundary, and the tests pass.Desired behaviour
The user should be able to specify a regex that bypasses the specific boundary attribute checking (see working JVM example with desired behaviour: https://github.com/pact-foundation/pact-jvm/blob/master/consumer/junit5/src/test/java/au/com/dius/pact/consumer/junit5/MultipartRequestTest.java#L50-L55)
Discussion
The
pactffi_with_body
FFI method is the underlying function used here to set the initial body and content type.The body content matcher should only be checking the main type to see if it got the correct content type (
multipart/form-data
) and not the attributes. This seems to be the cause of the issue and perhaps is only present in the FFI.The text was updated successfully, but these errors were encountered: