I am deleting a parent object which also deletes a child object. After deletion, I need to send a get request and check 404 status inside test. How can I do that? I tried:
pm.test("Child category is also deleted", function(res) {
pm.sendRequest({
url: "url",
method: 'GET',
header: {
'content-type': 'application/json',
'Authorization': "Bearer " + pm.environment.get("accessToken"),
'Accept': "*/*"
}
});
pm.response.to.have.status(404);
});