MCPcopy Create free account
hub / github.com/GraphLite-AI/GraphLite / test_simple_insert

Function test_simple_insert

graphlite/tests/simple_insert_test.rs:7–45  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5
6#[test]
7fn test_simple_insert() {
8 let fixture = TestFixture::new().expect("Failed to create fixture");
9
10 // Setup fresh graph for this test
11 fixture
12 .setup_graph("test_graph")
13 .expect("Failed to setup graph");
14
15 // Try simplest possible INSERT
16 fixture
17 .query("INSERT (n:TestNode {id: 1})")
18 .expect("Failed to insert simple node");
19
20 // Test each property type individually
21 fixture
22 .query("INSERT (a1:Account {id: 1})")
23 .expect("Failed with just id");
24
25 fixture
26 .query("INSERT (a2:Account {name: 'Account1'})")
27 .expect("Failed with name property");
28
29 fixture
30 .query("INSERT (a3:Account {balance: 100.0})")
31 .expect("Failed with balance property");
32
33 // Try with quoted property name
34 fixture
35 .query("INSERT (a4:Account {`status`: 'active'})")
36 .expect("Failed with quoted status property");
37
38 fixture
39 .query("INSERT (a5:Account {account_type: 'savings'})")
40 .expect("Failed with account_type property");
41
42 // Try full Account node like fraud fixture uses
43 fixture.query("INSERT (a:Account {id: 1, name: 'Account1', balance: 100.0, status: 'active', account_type: 'savings'})")
44 .expect("Failed to insert full Account node");
45}

Callers

nothing calls this directly

Calls 2

setup_graphMethod · 0.80
queryMethod · 0.45

Tested by

no test coverage detected