()
| 600 | |
| 601 | #[test] |
| 602 | fn test_build_context_string() { |
| 603 | let nodes = vec![ |
| 604 | KgNode::new("change:abc", "change", "abc123", "graph").with_summary("Fix auth bug"), |
| 605 | KgNode::new("file:src/auth.rs", "file", "src/auth.rs", "graph"), |
| 606 | ]; |
| 607 | let edges = vec![KgEdge::new("change:abc", "file:src/auth.rs", "MODIFIES")]; |
| 608 | |
| 609 | let context = build_context_string(&nodes, &edges, "who fixed auth?"); |
| 610 | assert!(context.contains("abc123")); |
| 611 | assert!(context.contains("Fix auth bug")); |
| 612 | assert!(context.contains("MODIFIES")); |
| 613 | assert!(context.contains("who fixed auth?")); |
| 614 | } |
| 615 | |
| 616 | #[test] |
| 617 | fn test_build_context_string_empty() { |
nothing calls this directly
no test coverage detected