test: add mock for patch service in application.command.test.ts and application.real.test.ts

- Introduced a mock for the patch service's findMany method in both test files to simulate database behavior.
- This change enhances test coverage and ensures consistency across the test suite.
This commit is contained in:
Mauricio Siu
2026-02-18 15:35:14 -06:00
parent f7079f51de
commit 0d4d60953e
2 changed files with 6 additions and 0 deletions

View File

@@ -28,6 +28,9 @@ vi.mock("@dokploy/server/db", () => {
applications: {
findFirst: vi.fn(),
},
patch: {
findMany: vi.fn().mockResolvedValue([]),
},
},
},
};

View File

@@ -29,6 +29,9 @@ vi.mock("@dokploy/server/db", () => {
applications: {
findFirst: vi.fn(),
},
patch: {
findMany: vi.fn().mockResolvedValue([]),
},
},
},
};