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:
Mauricio Siu
2026-02-04 23:28:51 -06:00
parent 8335f40238
commit cfb9534e06

View File

@@ -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",