App Details:
Postman for Windows
Version 6.0.8
win32 10.0.16299 / x64
Issue Report:
- send (with status 200) request with json body response, for instance:
{
"item_list",
"pagination": {
"pages": 1
}
}
- in test page put code contain assertion: "pm.response.to.not.be.error;" for instance:
pm.test('has pagination', function () {
pm.response.to.have.jsonBody('pagination');
pm.response.to.have.jsonBody('pagination.pages');
});
pm.test('wired behaviour: to.not.be.error', function () {
pm.response.to.have.jsonBody('pagination.pages');
pm.response.to.not.be.error;
pm.response.to.have.jsonBody('pagination');
});
pm.test('has pagination after to.not.be.error', function () {
pm.response.to.have.jsonBody('pagination');
});
- result is corrupted, assertion after to.not.be.error start to fail with reason:
response to not contain
but we never use assertion to.not.have.jsonBody
Screen:
