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

Function test_append_goal

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

Source from the content-addressed store, hash-verified

41
42#[test]
43fn test_append_goal() {
44 let mut acc = ProvenanceAccumulator::new("s1");
45 let id = acc.append_goal("Fix the auth bug", 1000);
46
47 assert!(!id.is_empty());
48 assert_eq!(acc.node_count(), 1);
49 assert_eq!(acc.stats().goal_count, 1);
50 assert_eq!(acc.current_goal(), Some(id.as_str()));
51
52 let node = &acc.nodes()[0];
53 assert_eq!(node.kind, NodeKind::Goal);
54 assert_eq!(node.summary, "Fix the auth bug");
55 assert_eq!(node.timestamp, 1000);
56}
57
58#[test]
59fn test_chained_goals() {

Callers

nothing calls this directly

Calls 2

append_goalMethod · 0.80
nodesMethod · 0.45

Tested by

no test coverage detected