Add more integration tests #31

Merged
joeybaker merged 7 commits from code-coverage into master 2016-10-28 18:28:06 +00:00
Showing only changes of commit 1daa68e03e - Show all commits

View File

@ -309,6 +309,8 @@ export const destroyScope = ({ server, model, prefix = '/', config }) => {
const list = await model.scope(request.params.scope).findAll({ include, where });
if (!list.length) return void reply(notFound('Nothing found.'));
await Promise.all(list.map(instance => instance.destroy()));
const listAsJSON = list.map((item) => item.toJSON());