fix(core): Fix credentials test (#6569)

fix credentials test
This commit is contained in:
Michael Auerswald 2023-06-29 14:48:55 +02:00 committed by कारतोफ्फेलस्क्रिप्ट™
parent f841f187ec
commit 8f244df0f9

View file

@ -100,8 +100,12 @@ describe('GET /credentials', () => {
expect(response.statusCode).toBe(200);
expect(response.body.data).toHaveLength(2); // owner retrieved owner cred and member cred
const [ownerCredential, memberCredential] = response.body.data as CredentialWithSharings[];
const ownerCredential = response.body.data.find(
(e: CredentialWithSharings) => e.ownedBy?.id === owner.id,
);
const memberCredential = response.body.data.find(
(e: CredentialWithSharings) => e.ownedBy?.id === member1.id,
);
validateMainCredentialData(ownerCredential);
expect(ownerCredential.data).toBeUndefined();