Removed pointless query.

This commit is contained in:
Jeff Baskin 2022-07-01 12:35:00 -04:00
parent adb4740a10
commit f1dbe6daf0

View File

@ -24,10 +24,6 @@ struct Query;
#[Object] #[Object]
impl Query { impl Query {
async fn pointless(&self) -> String {
"this is pointless.".to_string()
}
async fn tables(&self, ctx: &Context<'_>) -> Vec<Table> { async fn tables(&self, ctx: &Context<'_>) -> Vec<Table> {
ctx.data::<RwLock<Vec<Table>>>() ctx.data::<RwLock<Vec<Table>>>()
.unwrap() .unwrap()
@ -89,20 +85,6 @@ mod support {
mod queries { mod queries {
use super::*; use super::*;
#[async_std::test]
async fn working() {
let db = Database::new();
let output = db.execute("{pointless}").await;
let expected = r#"{"data":{"pointless":"this is pointless."}}"#;
support::compare(&db, &output, &expected);
assert!(
output == expected,
"Got '{}' instead of '{}'.",
output,
expected
)
}
#[async_std::test] #[async_std::test]
async fn list_tables() { async fn list_tables() {
let db = Database::new(); let db = Database::new();