MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / test_append_goal

Function test_append_goal

atomic-agent/src/provenance/accumulator/tests.rs:21–34  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

19
20#[test]
21fn test_append_goal() {
22 let mut acc = ProvenanceAccumulator::new("s1");
23 let id = acc.append_goal("Fix the auth bug", 1000);
24
25 assert!(!id.is_empty());
26 assert_eq!(acc.node_count(), 1);
27 assert_eq!(acc.stats().goal_count, 1);
28 assert_eq!(acc.current_goal(), Some(id.as_str()));
29
30 let node = &acc.nodes()[0];
31 assert_eq!(node.kind, NodeKind::Goal);
32 assert_eq!(node.summary, "Fix the auth bug");
33 assert_eq!(node.timestamp, 1000);
34}
35
36#[test]
37fn test_chained_goals() {

Callers

nothing calls this directly

Calls 2

append_goalMethod · 0.80
nodesMethod · 0.45

Tested by

no test coverage detected