feat: Update endpoint hashad
This commit is contained in:
parent
53b74c92e3
commit
878b33c251
@ -0,0 +1,19 @@
|
|||||||
|
let jsonData = pm.response.json();
|
||||||
|
|
||||||
|
pm.test("Status code is 200", function () {
|
||||||
|
pm.response.to.have.status(200);
|
||||||
|
});
|
||||||
|
|
||||||
|
pm.test("Response contains carts array", function () {
|
||||||
|
pm.expect(jsonData).to.have.property("carts");
|
||||||
|
pm.expect(jsonData.carts).to.be.an("array");
|
||||||
|
});
|
||||||
|
|
||||||
|
pm.test("Each cart has required properties", function () {
|
||||||
|
jsonData.carts.forEach(cart => {
|
||||||
|
pm.expect(cart).to.have.property("id");
|
||||||
|
pm.expect(cart).to.have.property("total");
|
||||||
|
pm.expect(cart).to.have.property("products");
|
||||||
|
pm.expect(cart.products).to.be.an("array");
|
||||||
|
});
|
||||||
|
});
|
Loading…
x
Reference in New Issue
Block a user