mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-06-15 20:25:23 +02: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(),
|
||||
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",
|
||||
|
||||
Reference in New Issue
Block a user