mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2026-01-20 20:01:25 +00:00
Fix posts resolver spec
This commit is contained in:
parent
3f5ac61b73
commit
2033b1791c
@ -243,10 +243,9 @@ describe('UpdatePost', () => {
|
||||
}
|
||||
`
|
||||
beforeEach(async () => {
|
||||
const asAuthor = Factory()
|
||||
await asAuthor.create('User', authorParams)
|
||||
await asAuthor.authenticateAs(authorParams)
|
||||
await asAuthor.create('Post', {
|
||||
const user = await factory.create('User', authorParams)
|
||||
await factory.create('Post', {
|
||||
author: user,
|
||||
id: postId,
|
||||
title: oldTitle,
|
||||
content: oldContent,
|
||||
@ -400,11 +399,10 @@ describe('DeletePost', () => {
|
||||
}
|
||||
|
||||
beforeEach(async () => {
|
||||
const asAuthor = Factory()
|
||||
await asAuthor.create('User', authorParams)
|
||||
await asAuthor.authenticateAs(authorParams)
|
||||
await asAuthor.create('Post', {
|
||||
const user = await factory.create('User', authorParams)
|
||||
await factory.create('Post', {
|
||||
id: postId,
|
||||
author: user,
|
||||
content: 'To be deleted',
|
||||
categoryIds,
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user