()
| 444 | |
| 445 | #[test] |
| 446 | fn test_readme_delete_node() { |
| 447 | let fixture = TestFixture::new().expect("Failed to create fixture"); |
| 448 | fixture |
| 449 | .setup_graph("readme_delete_test") |
| 450 | .expect("Failed to setup graph"); |
| 451 | |
| 452 | // Create nodes |
| 453 | fixture |
| 454 | .query("INSERT (:Person {name: 'Bob'}), (:Person {name: 'Alice'})") |
| 455 | .expect("Insert should succeed"); |
| 456 | |
| 457 | // Delete nodes |
| 458 | fixture |
| 459 | .query("MATCH (p:Person {name: 'Bob'}) DELETE p") |
| 460 | .expect("DELETE should succeed"); |
| 461 | |
| 462 | // Verify Bob is deleted |
| 463 | let result = fixture |
| 464 | .query("MATCH (p:Person {name: 'Bob'}) RETURN p") |
| 465 | .expect("Query should succeed"); |
| 466 | assert_eq!(result.rows.len(), 0, "Bob should be deleted"); |
| 467 | |
| 468 | // Verify Alice still exists |
| 469 | let result = fixture |
| 470 | .query("MATCH (p:Person {name: 'Alice'}) RETURN p") |
| 471 | .expect("Query should succeed"); |
| 472 | assert_eq!(result.rows.len(), 1, "Alice should still exist"); |
| 473 | } |
| 474 | |
| 475 | // ============================================================================ |
| 476 | // Aggregation Examples Tests |
nothing calls this directly
no test coverage detected