Skip to content

Commit 7b80b88

Browse files
chore(api): set clientApplication createdAt in the past (in tests)
Co-authored-by: Aurélie Crouillebois <aurelie.crouillebois@pix.fr>
1 parent 82af403 commit 7b80b88

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

api/tests/identity-access-management/integration/infrastructure/repositories/client-application.repository.test.js

+8
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,25 @@ describe('Integration | Identity Access Management | Infrastructure | Repository
77
let application2;
88

99
beforeEach(async function () {
10+
const createdAt = new Date();
11+
// To avoid flackyness on date comparison, we set createdAt in the past
12+
createdAt.setMinutes(-1);
13+
1014
application2 = databaseBuilder.factory.buildClientApplication({
1115
name: 'appli2',
1216
clientId: 'clientId-appli2',
1317
clientSecret: 'secret-app2',
1418
scopes: ['scope3', 'scope4', 'scope5'],
19+
createdAt,
20+
updatedAt: createdAt,
1521
});
1622
application1 = databaseBuilder.factory.buildClientApplication({
1723
name: 'appli1',
1824
clientId: 'clientId-appli1',
1925
clientSecret: 'secret-app1',
2026
scopes: ['scope1', 'scope2'],
27+
createdAt,
28+
updatedAt: createdAt,
2129
});
2230

2331
await databaseBuilder.commit();

0 commit comments

Comments
 (0)