mirror of
https://github.com/strapi/strapi.git
synced 2025-11-02 10:55:37 +00:00
remove test
This commit is contained in:
parent
3ce256e279
commit
db4c3af1f9
@ -197,38 +197,4 @@ describe('Permission Controller', () => {
|
||||
expect(ctx.body.data).toHaveLength(localTestData.permissions.valid.length);
|
||||
});
|
||||
});
|
||||
|
||||
describe('Content API permissions', () => {
|
||||
const actionsMap = {
|
||||
'api::address': {
|
||||
controllers: {
|
||||
address: ['find', 'findOne'],
|
||||
},
|
||||
},
|
||||
'api::category': {
|
||||
controllers: {
|
||||
category: ['find', 'findOne', 'create', 'update', 'delete', 'createLocalization'],
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
test('return API tokens layout successfully', async () => {
|
||||
const getActionsMap = jest.fn().mockResolvedValue(actionsMap);
|
||||
const send = jest.fn();
|
||||
const ctx = createContext({}, { send });
|
||||
|
||||
global.strapi = {
|
||||
contentAPI: {
|
||||
permissions: {
|
||||
getActionsMap,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
await permissionController.getContentApiPermissions(ctx);
|
||||
|
||||
expect(getActionsMap).toHaveBeenCalled();
|
||||
expect(send).toHaveBeenCalledWith({ data: actionsMap });
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user