Closed beltram closed 3 years ago
Thanks for reporting the issue!
It's now fixed in 0.4.0-alpha.2
:grin:
I got the same panic on unwrap, but interestingly my mock wasn't setting headers at all...
Mock::given(method("POST"))
.and(path(
"/api/v1/entity/notes/123456/attachments/_upload/multipart_abort",
))
.respond_with(ResponseTemplate::new(204))
.expect(1)
.mount(&mock_server)
.await;
The good news is, the fix in 0.4.0.alpha.2
worked for me too! :partying_face:
Hi, first of all congrats for the effort, I like the initiative.
After playing with it I found appending a response headers is not working.
Problem comes from this line. stdlib implementation of HashMap::insert returns None when key is not already present and since unwrap() is used it fails every time. Simply removing unwrap should fix this.