graphql-engine/server/testcases/drop_table_manual_delete.json
2018-06-28 00:32:00 +05:30

96 lines
2.2 KiB
JSON

{
"description": "drop test",
"depends": [
"permission.json"
],
"items": [
{
"name": "drop article no cascade",
"url": "/api/1/query",
"role": "admin",
"status_code": 400,
"method": "POST",
"user_id": "1",
"response": {
"path": "$",
"error": "can not delete due to the following dependent objects - [(\"author\",relationship,\"articles\"),(\"category\",relationship,\"articles\")]"
},
"request": {
"kind": "drop_table",
"body": {
"__type": "drop_table",
"table": "article",
"cascade": false
}
}
},
{
"name": "drop articles rel on author",
"url": "/api/1/query",
"role": "admin",
"status_code": 200,
"method": "POST",
"user_id": "1",
"request": {
"kind": "drop_relationship",
"body": {
"__type": "drop_relationship",
"table": "author",
"relationship": "articles"
}
}
},
{
"name": "drop article no cascade",
"url": "/api/1/query",
"role": "admin",
"status_code": 400,
"method": "POST",
"user_id": "1",
"response": {
"path": "$",
"error": "can not delete due to the following dependent objects - [(\"category\",relationship,\"articles\")]"
},
"request": {
"kind": "drop_table",
"body": {
"__type": "drop_table",
"table": "article",
"cascade": false
}
}
},
{
"name": "drop articles rel on category",
"url": "/api/1/query",
"role": "admin",
"status_code": 200,
"method": "POST",
"user_id": "1",
"request": {
"kind": "drop_relationship",
"body": {
"__type": "drop_relationship",
"table": "category",
"relationship": "articles"
}
}
},
{
"name": "drop article no cascade",
"url": "/api/1/query",
"role": "admin",
"status_code": 200,
"method": "POST",
"user_id": "1",
"request": {
"kind": "drop_table",
"body": {
"__type": "drop_table",
"table": "article",
"cascade": false
}
}
}
]
}