mirror of
https://github.com/strapi/strapi.git
synced 2025-07-23 09:00:19 +00:00
23 lines
619 B
JavaScript
23 lines
619 B
JavaScript
![]() |
const { registerAndLogin } = require('../../../test/helpers/auth');
|
||
|
const { createAuthRequest } = require('../../../test/helpers/request');
|
||
|
const expectedPermissions = require('./permissions');
|
||
|
|
||
|
let rq;
|
||
|
|
||
|
describe('Role CRUD End to End', () => {
|
||
|
beforeAll(async () => {
|
||
|
const token = await registerAndLogin();
|
||
|
rq = createAuthRequest(token);
|
||
|
}, 60000);
|
||
|
|
||
|
test('Can get the existing permissions', async () => {
|
||
|
let res = await rq({
|
||
|
url: '/admin/permissions',
|
||
|
method: 'GET',
|
||
|
});
|
||
|
|
||
|
expect(res.statusCode).toBe(200);
|
||
|
expect(res.body.data).toMatchObject(expectedPermissions);
|
||
|
});
|
||
|
});
|