mirror of
https://github.com/strapi/strapi.git
synced 2025-12-28 15:44:59 +00:00
Test graphql delete returns the entity
This commit is contained in:
parent
d491636548
commit
57315af263
@ -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,
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@ -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,
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user