The minimalistic document archiving platform.
fix(tests): add createdAt field to user for deterministic ordering (#694)
Corentin Thomassetf7bf20223023
diff --git a/apps/papra-server/src/modules/users/users.repository.test.ts b/apps/papra-server/src/modules/users/users.repository.test.tsindex 2cfb9deb..fc236e9c 100644--- a/apps/papra-server/src/modules/users/users.repository.test.ts+++ b/apps/papra-server/src/modules/users/users.repository.test.ts@@ -63,8 +63,8 @@ describe('users repository', () => {test('when multiple users exist, all users are returned with organization counts', async () => {const { db } = await createInMemoryDatabase({users: [- { id: 'usr_1', email: '[email protected]', name: 'Alice' },- { id: 'usr_2', email: '[email protected]', name: 'Bob' },+ { id: 'usr_1', email: '[email protected]', name: 'Alice', createdAt: new Date('2025-01-01') },+ { id: 'usr_2', email: '[email protected]', name: 'Bob', createdAt: new Date('2025-01-02') },],organizations: [{ id: 'org_1', name: 'Org 1' },@@ -89,8 +89,8 @@ describe('users repository', () => {organizationCount: u.organizationCount,})),).to.deep.equal([- { id: 'usr_1', email: '[email protected]', organizationCount: 1 },{ id: 'usr_2', email: '[email protected]', organizationCount: 0 },+ { id: 'usr_1', email: '[email protected]', organizationCount: 1 },]);});