ensure that every post has an author

This commit is contained in:
Moriz Wahl 2020-03-10 20:41:10 +01:00 committed by mattwr18
parent 5b5fc09053
commit 4f8d605b88

View File

@ -65,11 +65,17 @@ const createExpectedObject = array => {
}
const addPostToDB = post => {
return Factory.build('post', {
id: post.id,
title: post.title,
content: post.content,
})
return Factory.build(
'post',
{
id: post.id,
title: post.title,
content: post.content,
},
{
authorId: 'a-user',
},
)
}
const addUserToDB = user => {