Skip to content

Commit

Permalink
patch batch test
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucietta O'Crescendo committed Jan 29, 2025
1 parent 02a6563 commit e82dcc2
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion tests/test_load_tx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ async fn test_tx_batch() -> anyhow::Result<()> {
assert!(res.created_tx == txs.len() as u64);

let cypher_query = query(
"MATCH ()-[r]->()
"MATCH ()-[r:Tx]->()
RETURN count(r) AS total_tx_count",
);

Expand All @@ -54,6 +54,18 @@ async fn test_tx_batch() -> anyhow::Result<()> {

assert!(total_tx_count == txs.len() as i64);


let cypher_query = query(
"MATCH ()-[r:Lifetime]->()
RETURN count(r) AS total_tx_count",
);
// Execute the query
let mut result = graph.execute(cypher_query).await?;
// Fetch the first row only
let row = result.next().await?.unwrap();
let total_tx_count: i64 = row.get("total_tx_count").unwrap();
assert!(total_tx_count == 18 as i64);

// check there are transaction records with function args.
let cypher_query = query(
"MATCH ()-[r]->()
Expand Down

0 comments on commit e82dcc2

Please sign in to comment.