mirror of
https://github.com/andwati/dokploy.git
synced 2026-11-09 21:45:17 +00:00
feat(tests): enhance mock database with web server settings for testing
- Added mock implementations for `webServerSettings` to support the `getWebServerSettings` function in tests. - This update improves the test environment by simulating necessary database interactions for web server settings.
This commit is contained in:
@@ -49,6 +49,11 @@ vi.mock("@dokploy/server/db", () => {
|
|||||||
findFirst: vi.fn(),
|
findFirst: vi.fn(),
|
||||||
findMany: vi.fn(),
|
findMany: vi.fn(),
|
||||||
},
|
},
|
||||||
|
// Necesario para getWebServerSettings (lib/auth -> trustedOrigins)
|
||||||
|
webServerSettings: {
|
||||||
|
findFirst: vi.fn().mockResolvedValue(null),
|
||||||
|
findMany: vi.fn().mockResolvedValue([]),
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
dbUrl: "postgres://mock:mock@localhost:5432/mock",
|
dbUrl: "postgres://mock:mock@localhost:5432/mock",
|
||||||
|
|||||||
Reference in New Issue
Block a user