Skip to content

Commit

Permalink
fix(test): fixed post-test deleting, v2
Browse files Browse the repository at this point in the history
  • Loading branch information
serge1peshcoff committed Feb 4, 2020
1 parent fd254b1 commit ab50883
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/scripts/generator.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const faker = require('faker');

const { User, Campaign } = require('../../models');
const { User, Campaign, MailConfirmation } = require('../../models');

const notSet = (field) => typeof field === 'undefined';

Expand Down Expand Up @@ -36,6 +36,7 @@ exports.createCampaign = (options = {}) => {
};

exports.clearAll = async () => {
await MailConfirmation.destroy({ where: {}, truncate: { cascade: true } });
await User.destroy({ where: {}, truncate: { cascade: true } });
await Campaign.destroy({ where: {}, truncate: { cascade: true } });
};

0 comments on commit ab50883

Please sign in to comment.