mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-13 22:07:35 -08:00
parent
9bd49e844a
commit
1abd172f73
|
@ -100,8 +100,12 @@ describe('GET /credentials', () => {
|
||||||
|
|
||||||
expect(response.statusCode).toBe(200);
|
expect(response.statusCode).toBe(200);
|
||||||
expect(response.body.data).toHaveLength(2); // owner retrieved owner cred and member cred
|
expect(response.body.data).toHaveLength(2); // owner retrieved owner cred and member cred
|
||||||
|
const ownerCredential = response.body.data.find(
|
||||||
const [ownerCredential, memberCredential] = response.body.data as CredentialWithSharings[];
|
(e: CredentialWithSharings) => e.ownedBy?.id === owner.id,
|
||||||
|
);
|
||||||
|
const memberCredential = response.body.data.find(
|
||||||
|
(e: CredentialWithSharings) => e.ownedBy?.id === member1.id,
|
||||||
|
);
|
||||||
|
|
||||||
validateMainCredentialData(ownerCredential);
|
validateMainCredentialData(ownerCredential);
|
||||||
expect(ownerCredential.data).toBeUndefined();
|
expect(ownerCredential.data).toBeUndefined();
|
||||||
|
|
Loading…
Reference in a new issue