0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-11 02:12:21 -05:00

Removed support for single "author" shorthand in fixtures

refs https://github.com/TryGhost/Toolbox/issues/230

 - The test fixtures should be using `authors: [{id:...}]` syntax instead of relyin on `author_id` or `author` - these are deprecated concepts that should go away from the codebase
This commit is contained in:
Naz 2022-05-02 15:00:36 +08:00 committed by naz
parent b71c1895fb
commit 7fbf2a62ac

View file

@ -76,11 +76,6 @@ const createUser = function createUser(options) {
const createPost = function createPost(options) { const createPost = function createPost(options) {
const post = DataGenerator.forKnex.createPost(options.post); const post = DataGenerator.forKnex.createPost(options.post);
if (options.author) {
post.author_id = options.author.id;
}
post.authors = [{id: post.author_id}];
return models.Post.add(post, context.internal); return models.Post.add(post, context.internal);
}; };