Resolve failing test

This commit is contained in:
aonomike 2019-10-09 13:25:41 +03:00 committed by mattwr18
parent ab06e8a91f
commit 56d88d6e84
2 changed files with 7 additions and 2 deletions

View File

@ -97,7 +97,8 @@ export default {
`
}
createPostCypher += `UNWIND $categoryIds AS categoryId
createPostCypher += `
UNWIND $categoryIds AS categoryId
MATCH (category:Category {id: categoryId})
MERGE (post)-[:CATEGORIZED]->(category)
RETURN post`

View File

@ -282,7 +282,10 @@ describe('CreatePost', () => {
})
it('creates a post', async () => {
const expected = { data: { CreatePost: { title: 'I am a title', content: 'Some content' } } }
const expected = {
data: { CreatePost: { title: 'I am a title', content: 'Some content' } },
errors: undefined,
}
await expect(mutate({ mutation: createPostMutation, variables })).resolves.toMatchObject(
expected,
)
@ -298,6 +301,7 @@ describe('CreatePost', () => {
},
},
},
errors: undefined,
}
await expect(mutate({ mutation: createPostMutation, variables })).resolves.toMatchObject(
expected,