Open NataliaAru opened 5 years ago
Are you interested in working on this with me @NataliaAru?
@bethesque I don't have much experience, but i would love to contribute if I can!
Ok, I've released version 1.33.0 with support for multipart/form
matching. Here's an example of how to do the matching:
As you can see, the interface is a bit clunky compared to the Groovy
If you're interested in contributing, you could have a go at making a nicer way of creating the expected upload body and headers?
file_upload_service
.upon_receiving("a request to upload a file")
.with(method: :post, path: '/files')
.and_file('file', 'text.txt', 'text/plain', File.read(file_to_upload))
will_respond_with(status: 200)
This is the class for the fluent API https://github.com/pact-foundation/pact-ruby/blob/master/lib/pact/consumer/interaction_builder.rb
ah, I will test this against our project and try to do the interface!
Closing due to inactivity, but please reopen if needed.
I am trying to write a pact test in Ruby, where consumer makes a post call with payload{ multipart: true, file: fileObject, name: "name" } where file is some kind of media file. please, make support for this feature