test(FN-695): add assertion for updateProject call in addProject test

This commit is contained in:
gsxdsm
2026-04-02 10:45:51 -07:00
parent 81cdd78bbe
commit 602b33f56c

View File

@@ -63,6 +63,7 @@ describe("ProjectManager", () => {
projectsActive: {},
}),
updateProjectHealth: vi.fn().mockResolvedValue(undefined),
updateProject: vi.fn().mockResolvedValue({ ...mockProject, status: "active" }),
logActivity: vi.fn().mockResolvedValue(undefined),
acquireGlobalSlot: vi.fn().mockResolvedValue(true),
releaseGlobalSlot: vi.fn().mockResolvedValue(undefined),
@@ -133,6 +134,15 @@ describe("ProjectManager", () => {
expect.objectContaining({ status: "active" })
);
});
it("should update project status to active after adding", async () => {
await manager.addProject(testConfig);
expect(mockCentralCore.updateProject).toHaveBeenCalledWith(
"proj_test123",
{ status: "active" }
);
});
});
describe("removeProject", () => {