Skip to content

Commit

Permalink
fix body match
Browse files Browse the repository at this point in the history
  • Loading branch information
tejerka committed Jun 11, 2018
1 parent 57f7e13 commit cbf427e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/http-mock-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,11 @@ class HttpMockServer {
let matchBody = true;

if (endpointRequest.body) {
if (!request.body) {
return false;
}
Object.keys(endpointRequest.body).forEach(key => {
if (!request.body[key]) {
if (request.body[key] !== 0 && !request.body[key]) {
matchBody = false;
return;
}
Expand Down

0 comments on commit cbf427e

Please sign in to comment.