Skip to content

Commit 724ca75

Browse files
committed
test:
1 parent c267526 commit 724ca75

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

  • apps/meteor/tests/end-to-end/api

apps/meteor/tests/end-to-end/api/abac.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2616,7 +2616,13 @@ const addAbacAttributesToUserDirectly = async (userId: string, abacAttributes: I
26162616

26172617
after(async () => {
26182618
await Promise.all(createdRids.map((rid) => deleteRoom({ type: 'p', roomId: rid })));
2619-
await request.delete(`${v1}/abac/attributes/${announceKey}`).set(credentials).expect(200);
2619+
2620+
const listRes = await request.get(`${v1}/abac/attributes`).query({ key: announceKey }).set(credentials).expect(200);
2621+
const attr = listRes.body.attributes.find((a: { _id: string; key: string }) => a.key === announceKey);
2622+
if (attr) {
2623+
await request.delete(`${v1}/abac/attributes/${attr._id}`).set(credentials).expect(200);
2624+
}
2625+
26202626
await deleteUser(owner);
26212627
});
26222628

0 commit comments

Comments
 (0)