Test graphql delete returns the entity

This commit is contained in:
Alexandre Bodin 2019-08-23 14:15:24 +02:00
parent d491636548
commit 57315af263
2 changed files with 30 additions and 0 deletions

View File

@ -365,6 +365,7 @@ describe('Test Graphql API End to End', () => {
mutation deletePost($input: deletePostInput) {
deletePost(input: $input) {
post {
id
name
bigint
}
@ -381,6 +382,15 @@ describe('Test Graphql API End to End', () => {
});
expect(res.statusCode).toBe(200);
expect(res.body).toMatchObject({
data: {
deletePost: {
post: {
id: post.id,
},
},
},
});
}
});
});

View File

@ -329,6 +329,7 @@ describe('Test Graphql Relations API End to End', () => {
mutation deleteLabel($input: deleteLabelInput) {
deleteLabel(input: $input) {
label {
id
name
}
}
@ -344,6 +345,15 @@ describe('Test Graphql Relations API End to End', () => {
});
expect(res.statusCode).toBe(200);
expect(res.body).toMatchObject({
data: {
deleteLabel: {
label: {
id: label.id,
},
},
},
});
}
const res = await graphqlQuery({
@ -383,6 +393,7 @@ describe('Test Graphql Relations API End to End', () => {
mutation deleteDocument($input: deleteDocumentInput) {
deleteDocument(input: $input) {
document {
id
name
}
}
@ -398,6 +409,15 @@ describe('Test Graphql Relations API End to End', () => {
});
expect(res.statusCode).toBe(200);
expect(res.body).toMatchObject({
data: {
deleteDocument: {
document: {
id: document.id,
},
},
},
});
}
});
});