mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
ensure that every post has an author
This commit is contained in:
parent
5b5fc09053
commit
4f8d605b88
@ -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 => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user