surrealpatch/lib/tests/idiom.rs

15 lines
284 B
Rust
Raw Normal View History

2024-08-16 15:53:28 +00:00
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(())
}