test(server): follow the signatures the session and port work changed

The session gate passes a session lookup to verifyJwtAndLoadUser, the
Immich save takes auto_upload, getAppUrl stays synchronous, the demo
session list marks the current session by the id it is handed, and the
lease no longer needs a transaction of its own, so its spec is gone.
This commit is contained in:
Maurice
2026-10-08 20:22:16 +02:00
parent 37af6f4ff9
commit da97d7535f
6 changed files with 27 additions and 34 deletions
+2 -2
View File
@@ -219,10 +219,10 @@ describe('Memories e2e (real auth guard + temp SQLite)', () => {
immich.saveImmichSettings.mockResolvedValue({ success: true });
const on = await request(server).put(`${IMMICH}/settings`).set('Cookie', sessionCookie(1)).send({ immich_url: 'https://x', immich_api_key: 'k', allow_insecure_tls: true });
expect(on.status).toBe(200);
expect(immich.saveImmichSettings).toHaveBeenLastCalledWith(1, 'https://x', 'k', expect.anything(), true);
expect(immich.saveImmichSettings).toHaveBeenLastCalledWith(1, 'https://x', 'k', expect.anything(), true, undefined);
await request(server).put(`${IMMICH}/settings`).set('Cookie', sessionCookie(1)).send({ immich_url: 'https://x', immich_api_key: 'k' });
expect(immich.saveImmichSettings).toHaveBeenLastCalledWith(1, 'https://x', 'k', expect.anything(), undefined);
expect(immich.saveImmichSettings).toHaveBeenLastCalledWith(1, 'https://x', 'k', expect.anything(), undefined, undefined);
});
it('400 PUT settings and /test with a switch value that is not a boolean, before the service runs', async () => {