From b171b540b9b7e97ace9d2dbade3d57d38626c2d4 Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Mon, 28 Oct 2024 14:17:38 +0800 Subject: [PATCH] remove empty notification tests --- Server/tests/controllers/monitorController.test.js | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/Server/tests/controllers/monitorController.test.js b/Server/tests/controllers/monitorController.test.js index 8c36653ae..0d4deb742 100644 --- a/Server/tests/controllers/monitorController.test.js +++ b/Server/tests/controllers/monitorController.test.js @@ -419,12 +419,6 @@ describe("Monitor Controller - createMonitor", () => { expect(next.firstCall.args[0]).to.be.an("error"); expect(next.firstCall.args[0].message).to.equal("Job error"); }); - it("should fail validation with empty notifications", async () => { - req.body.notifications = []; - await createMonitor(req, res, next); - expect(next.firstCall.args[0]).to.be.an("error"); - expect(next.firstCall.args[0].status).to.equal(422); - }); it("should return success message and data if all operations succeed", async () => { const monitor = { _id: "123", save: sinon.stub() }; req.db.createMonitor.returns(monitor); @@ -790,12 +784,6 @@ describe("Monitor Controller - editMonitor", () => { expect(next.firstCall.args[0]).to.be.an("error"); expect(next.firstCall.args[0].message).to.equal("Add Job error"); }); - it("should fail validation with empty notifications", async () => { - req.body.notifications = []; - await editMonitor(req, res, next); - expect(next.firstCall.args[0]).to.be.an("error"); - expect(next.firstCall.args[0].status).to.equal(422); - }); it("should return success message with data if all operations succeed", async () => { const monitor = { _id: "123" }; req.db.getMonitorById.returns({ teamId: "123" });