mirror of
https://github.com/strapi/strapi.git
synced 2025-11-18 02:58:05 +00:00
Fix unit test
This commit is contained in:
parent
466161ca70
commit
8db5eabc80
@ -71,7 +71,7 @@ describe('Entity service', () => {
|
|||||||
expect(fakeStrapi.getModel).toHaveBeenCalledWith('test-model');
|
expect(fakeStrapi.getModel).toHaveBeenCalledWith('test-model');
|
||||||
|
|
||||||
expect(fakeDB.query).toHaveBeenCalledWith('test-model');
|
expect(fakeDB.query).toHaveBeenCalledWith('test-model');
|
||||||
expect(fakeQuery.findOne).toHaveBeenCalledWith({});
|
expect(fakeQuery.findOne).toHaveBeenCalledWith({ limit: 10 });
|
||||||
expect(result).toEqual(data);
|
expect(result).toEqual(data);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@ -23,7 +23,7 @@ const { MANY_RELATIONS } = relationsUtils.constants;
|
|||||||
// TODO: those should be strapi events used by the webhooks not the other way arround
|
// TODO: those should be strapi events used by the webhooks not the other way arround
|
||||||
const { ENTRY_CREATE, ENTRY_UPDATE, ENTRY_DELETE } = webhookUtils.webhookEvents;
|
const { ENTRY_CREATE, ENTRY_UPDATE, ENTRY_DELETE } = webhookUtils.webhookEvents;
|
||||||
|
|
||||||
const paginateAndTransformToQuery = (uid, opts) => {
|
const paginateAndTransformToQuery = (uid, opts = {}) => {
|
||||||
// Paginate the opts
|
// Paginate the opts
|
||||||
const paginatedOpts = paginationUtils.withDefaultPagination(opts);
|
const paginatedOpts = paginationUtils.withDefaultPagination(opts);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user