graphql-engine/server/testcases/add_existing_view.json

42 lines
883 B
JSON
Raw Normal View History

2018-06-27 16:11:32 +03:00
{
"description": "add existing view",
"depends": [],
"items": [
{
"name": "create_schema",
"url": "/api/1/query",
"role": "admin",
"status_code": 200,
"method": "POST",
"user_id": "1",
"pre_sql": [
"CREATE TABLE test(id serial)",
"CREATE VIEW test_view AS (SELECT id FROM test WHERE id > 10)"
],
"request": {
"kind": "add_existing_view",
"body": {
"view": "test_view"
}
}
},
{
"name": "create_schema",
"url": "/api/1/query",
"role": "admin",
"status_code": 400,
"method": "POST",
"response": {
"path": "$",
"error": "view already tracked"
},
"user_id": "1",
"request": {
"kind": "add_existing_view",
"body": {
"view": "test_view"
}
}
}
]
}