test: delete

This commit is contained in:
Marc-Roig 2023-04-27 11:39:01 +02:00
parent 266ff0b5b1
commit fee4af7e16
No known key found for this signature in database
GPG Key ID: FB4E2C43A0BEE249

View File

@ -84,11 +84,13 @@ const populate = {
}, },
}; };
const mockProvider = (signUrl = true) => ({ const isPrivate = true;
const mockProvider = () => ({
init() { init() {
return { return {
isPrivate() { isPrivate() {
return signUrl; return isPrivate;
}, },
getSignedUrl() { getSignedUrl() {
return { url: 'signedUrl' }; return { url: 'signedUrl' };
@ -227,38 +229,23 @@ describe('Upload Plugin url signing', () => {
test('entityService.update', async () => { test('entityService.update', async () => {
const model = await createModel(); const model = await createModel();
const en = await strapi.entityService.update(modelUID, model.id, { const entity = await strapi.entityService.update(modelUID, model.id, {
data: { data: {
name: 'model_updated', name: 'model_updated',
}, },
populate, populate,
}); });
responseExpectations(en); responseExpectations(entity);
}); });
// test('entityService.delete', async () => { test('entityService.delete', async () => {
// const en = await strapi.entityService.findMany(modelUID, entity, { const model = await createModel();
// populate, const entity = await strapi.entityService.delete(modelUID, model.id, {
// }); populate,
});
// responseExpectations(en); responseExpectations(entity);
// }); });
// });
// test('entityService.load', async () => {
// const en = await strapi.entityService.findMany(modelUID, entity, {
// populate,
// });
// responseExpectations(en);
// });
// test('entityService.loadPages', async () => {
// const en = await strapi.entityService.findMany(modelUID, entity, {
// populate,
// });
// responseExpectations(en);
}); });
}); });