Add missing test case
This commit is contained in:
1 parent
0374f5ad0b
commit
fbdbf5897e
1 file changed
+15
@@ -85,6 +85,21 @@ describe("maintenanceWindowController - createMaintenanceWindows", () => {
|
|||||||
).to.be.true;
|
).to.be.true;
|
||||||
stub.restore();
|
stub.restore();
|
||||||
});
|
});
|
||||||
|
it("should return success message if all operations are successful with active set to undefined", async () => {
|
||||||
|
req.body.active = undefined;
|
||||||
|
stub = sinon.stub(jwt, "verify").callsFake(() => {
|
||||||
|
return { teamId: "123" };
|
||||||
|
});
|
||||||
|
await createMaintenanceWindows(req, res, next);
|
||||||
|
expect(res.status.firstCall.args[0]).to.equal(201);
|
||||||
|
expect(
|
||||||
|
res.json.calledOnceWith({
|
||||||
|
success: true,
|
||||||
|
msg: successMessages.MAINTENANCE_WINDOW_CREATE,
|
||||||
|
})
|
||||||
|
).to.be.true;
|
||||||
|
stub.restore();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe("maintenanceWindowController - getMaintenanceWindowById", () => {
|
describe("maintenanceWindowController - getMaintenanceWindowById", () => {
|
||||||
|
|||||||
Reference in new issue
Block a user