Added empty table description.
This commit is contained in:
parent
e19c4c6c48
commit
5839cb93a2
@ -18,6 +18,10 @@ impl Table {
|
|||||||
async fn name(&self) -> String {
|
async fn name(&self) -> String {
|
||||||
self.name.to_string()
|
self.name.to_string()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async fn describe(&self) -> Vec<u64> {
|
||||||
|
Vec::new()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
struct Query;
|
struct Query;
|
||||||
@ -135,6 +139,16 @@ mod queries {
|
|||||||
let expected = r#"{"data":{"tables":[{"name":"barney"},{"name":"fred"}]}}"#;
|
let expected = r#"{"data":{"tables":[{"name":"barney"},{"name":"fred"}]}}"#;
|
||||||
support::compare(&db, &output, &expected);
|
support::compare(&db, &output, &expected);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[async_std::test]
|
||||||
|
async fn empty_table_description() {
|
||||||
|
let db = Database::new();
|
||||||
|
let output = db
|
||||||
|
.execute(r#"mutation {createTable(name: "pebbles"){name describe}}"#)
|
||||||
|
.await;
|
||||||
|
let expected = r#"{"data":{"createTable":{"name":"pebbles","describe":[]}}}"#;
|
||||||
|
support::compare(&db, &output, &expected);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
|
Loading…
Reference in New Issue
Block a user