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

Function test_builder_all_fields

atomic-core/src/change/envelope.rs:639–657  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

637
638 #[test]
639 fn test_builder_all_fields() {
640 let e = make_envelope();
641 assert_eq!(e.session_id, "sess-abc-123");
642 assert_eq!(e.agent_name, "claude-code");
643 assert_eq!(e.agent_display_name.as_deref(), Some("Claude Code"));
644 assert_eq!(e.turn_number, 3);
645 assert_eq!(e.total_turns, Some(7));
646 assert_eq!(e.session_started_at, 1737000000);
647 assert_eq!(e.turn_started_at, 1737000300);
648 assert_eq!(e.turn_ended_at, 1737000312);
649 assert_eq!(e.turn_duration_ms, 12400);
650 assert_eq!(
651 e.prompt_summary.as_deref(),
652 Some("Fix the authentication bug in login.rs")
653 );
654 assert_eq!(e.files_in_turn.len(), 2);
655 assert_eq!(e.files_in_session, 5);
656 assert_eq!(e.delegation_id.as_deref(), Some("deleg-xyz"));
657 }
658
659 #[test]
660 fn test_builder_prompt_hash_from_text() {

Callers

nothing calls this directly

Calls 1

make_envelopeFunction · 0.85

Tested by

no test coverage detected