diff --git a/test/utils/index.js b/test/utils/index.js index 3ab1bd2a6e..fc0046b197 100644 --- a/test/utils/index.js +++ b/test/utils/index.js @@ -64,11 +64,6 @@ fixtures = { return Promise.map(DataGenerator.forKnex.tags, function (tag) { return models.Tag.add(tag, module.exports.context.internal); }) - .then(function () { - return Promise.map(DataGenerator.forKnex.posts_meta, function (postMeta) { - return models.PostsMeta.add(postMeta, module.exports.context.internal); - }); - }) .then(function () { return Promise.each(_.cloneDeep(DataGenerator.forKnex.posts), function (post) { let postTagRelations = _.filter(DataGenerator.forKnex.posts_tags, {post_id: post.id}); @@ -87,6 +82,11 @@ fixtures = { return models.Post.add(post, module.exports.context.internal); }); + }) + .then(function () { + return Promise.map(DataGenerator.forKnex.posts_meta, function (postMeta) { + return models.PostsMeta.add(postMeta, module.exports.context.internal); + }); }); },