()
| 287 | |
| 288 | #[test] |
| 289 | fn test_call_statement_operations() { |
| 290 | let fixture = TestFixture::new().expect("Failed to create test fixture"); |
| 291 | // Setup fresh graph for this test to avoid interference |
| 292 | fixture |
| 293 | .setup_graph("test_call_statement_operations") |
| 294 | .expect("Failed to setup graph"); |
| 295 | // Re-insert fraud data since we have a fresh graph |
| 296 | fixture |
| 297 | .insert_fraud_data() |
| 298 | .expect("Failed to insert fraud data"); |
| 299 | |
| 300 | // Test system procedures |
| 301 | let result = fixture.assert_query_succeeds("CALL gql.list_schemas()"); |
| 302 | assert!(!result.rows.is_empty(), "Should have at least one schema"); |
| 303 | |
| 304 | let result = fixture.assert_query_succeeds("CALL gql.list_graphs()"); |
| 305 | assert!(!result.rows.is_empty(), "Should have at least one graph"); |
| 306 | |
| 307 | // Verify that graph_name is not NULL |
| 308 | let graph_name = result.rows[0] |
| 309 | .values |
| 310 | .get("graph_name") |
| 311 | .expect("Should have graph_name column"); |
| 312 | assert!( |
| 313 | !matches!(graph_name, Value::Null), |
| 314 | "graph_name should not be NULL, got: {:?}", |
| 315 | graph_name |
| 316 | ); |
| 317 | |
| 318 | // Verify that schema_name is not NULL |
| 319 | let schema_name = result.rows[0] |
| 320 | .values |
| 321 | .get("schema_name") |
| 322 | .expect("Should have schema_name column"); |
| 323 | assert!( |
| 324 | !matches!(schema_name, Value::Null), |
| 325 | "schema_name should not be NULL, got: {:?}", |
| 326 | schema_name |
| 327 | ); |
| 328 | |
| 329 | // Verify the graph name is a String (not NULL - this was the bug) |
| 330 | if let Value::String(name) = graph_name { |
| 331 | // Graph name should not be empty |
| 332 | assert!(!name.is_empty(), "Graph name should not be empty"); |
| 333 | } else { |
| 334 | panic!("graph_name should be a String, got: {:?}", graph_name); |
| 335 | } |
| 336 | } |
| 337 | |
| 338 | #[test] |
| 339 | fn test_dql_data_driven_cases() { |
nothing calls this directly
no test coverage detected