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

Function test_envelope_encodes_successfully

atomic-agent/src/record/tests.rs:839–853  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

837
838#[test]
839fn test_envelope_encodes_successfully() {
840 let session = make_session();
841 let event = make_event();
842 let options = make_options(&session, &event);
843 let files = vec!["src/auth.rs".to_string()];
844
845 let env = build_turn_envelope(&options, &files);
846 let bytes = env.encode().unwrap();
847 assert!(SessionEnvelope::is_session_envelope(&bytes));
848
849 // Roundtrip
850 let decoded = SessionEnvelope::decode(&bytes).unwrap();
851 assert_eq!(decoded.session_id, "sess-test-123");
852 assert_eq!(decoded.turn_number, 3);
853}
854
855// record_turn tests (error cases — success requires a real repository)
856

Callers

nothing calls this directly

Calls 6

make_eventFunction · 0.85
make_optionsFunction · 0.85
build_turn_envelopeFunction · 0.85
encodeMethod · 0.80
make_sessionFunction · 0.70
unwrapMethod · 0.45

Tested by

no test coverage detected