| 1485 | |
| 1486 | // Helper to create mock API integrations (same pattern as integrations.test.ts) |
| 1487 | function createMockApiIntegration(overrides: Partial<ApiIntegration> = {}): ApiIntegration { |
| 1488 | return { |
| 1489 | id: 'api-integration-id', |
| 1490 | name: 'API Database', |
| 1491 | type: 'pgsql', |
| 1492 | metadata: { |
| 1493 | host: 'api-host.example.com', |
| 1494 | database: 'api-database', |
| 1495 | user: 'api-user', |
| 1496 | password: 'api-secret', |
| 1497 | }, |
| 1498 | is_public: false, |
| 1499 | created_at: '2024-01-01T00:00:00Z', |
| 1500 | updated_at: '2024-01-01T00:00:00Z', |
| 1501 | federated_auth_method: null, |
| 1502 | ...overrides, |
| 1503 | } |
| 1504 | } |
| 1505 | |
| 1506 | it('fetches only the required integration IDs from the API', async () => { |
| 1507 | setupSuccessfulRun() |