From e7b70ce7cd8b346b62b64c20d1155f1783d97b04 Mon Sep 17 00:00:00 2001 From: Matt Rider Date: Wed, 3 Jul 2019 17:08:47 -0300 Subject: [PATCH] Fix failing test after new implementation merged in --- .../handleHtmlContent/handleContentData.spec.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/backend/src/middleware/handleHtmlContent/handleContentData.spec.js b/backend/src/middleware/handleHtmlContent/handleContentData.spec.js index 5ac0f3eda..e9439fe21 100644 --- a/backend/src/middleware/handleHtmlContent/handleContentData.spec.js +++ b/backend/src/middleware/handleHtmlContent/handleContentData.spec.js @@ -117,9 +117,9 @@ describe('currentUser { notifications }', () => { // during development and thought: A feature not a bug! This way we // can encode a re-mentioning of users when you edit your post or // comment. - const createPostMutation = gql` - mutation($id: ID!, $content: String!) { - UpdatePost(id: $id, content: $content) { + const updatePostMutation = gql` + mutation($id: ID!, $title: String!, $content: String!) { + UpdatePost(id: $id, content: $content, title: $title) { title content } @@ -128,8 +128,9 @@ describe('currentUser { notifications }', () => { authorClient = new GraphQLClient(host, { headers: authorHeaders, }) - await authorClient.request(createPostMutation, { + await authorClient.request(updatePostMutation, { id: post.id, + title: post.title, content: updatedContent, }) }) @@ -240,7 +241,7 @@ describe('Hashtags', () => { const updatedPostContent = '

Hey Dude, #Elections should work equal for everybody!? That seems to be the only way to have equal #Liberty for everyone.

' const updatePostMutation = gql` - mutation($postId: ID!, $postTitle: String, $updatedPostContent: String) { + mutation($postId: ID!, $postTitle: String!, $updatedPostContent: String!) { UpdatePost(id: $postId, title: $postTitle, content: $updatedPostContent) { id title