surrealpatch/lib/tests/idiom.rs
2024-08-16 15:53:28 +00:00

14 lines
284 B
Rust

mod helpers;
mod parse;
use helpers::Test;
use surrealdb::err::Error;
#[tokio::test]
async fn idiom_chain_part_optional() -> Result<(), Error> {
let sql = r#"
{}.prop.is_bool();
{}.prop?.is_bool();
"#;
Test::new(sql).await?.expect_val("false")?.expect_val("None")?;
Ok(())
}