mirror of
https://github.com/strapi/strapi.git
synced 2025-12-03 10:32:10 +00:00
sort permissions to compare
This commit is contained in:
parent
5085f5ed45
commit
0b8ecaaccb
@ -335,7 +335,12 @@ describe('Admin API Token v2 CRUD (e2e)', () => {
|
||||
// check that each token exists in data
|
||||
tokens.forEach((token) => {
|
||||
const t = res.body.data.find((t) => t.id === token.id);
|
||||
expect(t).toMatchObject(omit(token, 'accessKey'));
|
||||
if (t.permissions) {
|
||||
t.permissions = t.permissions.sort();
|
||||
// eslint-disable-next-line no-param-reassign
|
||||
token.permissions = token.permissions.sort();
|
||||
}
|
||||
expect(t).toMatchObject(omit(token, ['accessKey']));
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user