From a9f7f211d07083d67f5d7ca542c0f83c36d7d325 Mon Sep 17 00:00:00 2001 From: Backend IM Bot Date: Tue, 11 Mar 2025 10:50:25 +0000 Subject: [PATCH] feat: Update endpoint Akeem --- app/api/endpoints/Akeem.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/app/api/endpoints/Akeem.py b/app/api/endpoints/Akeem.py index e69de29..8444741 100644 --- a/app/api/endpoints/Akeem.py +++ b/app/api/endpoints/Akeem.py @@ -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"); + }); +});