Hi, everyone
I don't know how I could write a test for the part of out API (that is implemented in pedestal)
that accepts a file and uses Ring multi-part interceptor ? (Can I use the pedestal.test/response-for
here
the same way I used it for body params and such ? How should I construct the request and how should I feed the file to response-for
?)
It will be great if anyone could help me
Thanks in advance
Hi Thank you for your answer I have another issue about this subject How can we add also a simple key value near my file in the request body? Thank you for your time.
@mh.meraji12 it’s just a matter of adding additional fields wrapped by the boundary. The fields in the above sample do no need to be files
Thanks a lot @ddeaguiar
@ddeaguiar Sorry another question, here you have sent a string file. But I want to send xlsx files. Can I use the same method for sending ?
Thanks again
@dr.w.breen, that’s a great question. Yes you can. I’ve added a sample of how you’d construct the request to the cookbook documentation (http://pedestal.io/cookbook/index#_how_to_test_your_servlet_based_service). I’ve pasted the relevant bits above.