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

Function test_envelope_encodes_successfully

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

Source from the content-addressed store, hash-verified

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

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