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

Function test_new_session

atomic-agent/src/turn/session.rs:1519–1541  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1517
1518 #[test]
1519 fn test_new_session() {
1520 let s = make_session();
1521 assert_eq!(s.session_id, "sess-abc-123");
1522 assert_eq!(s.agent_name, "claude-code");
1523 assert_eq!(s.agent_display_name, "Claude Code");
1524 // View name is haikunator-style: adjective-noun-hex
1525 let parts: Vec<&str> = s.view_name.split('-').collect();
1526 assert_eq!(
1527 parts.len(),
1528 3,
1529 "view name '{}' should be adj-noun-hex",
1530 s.view_name
1531 );
1532 assert_eq!(parts[2].len(), 4);
1533 assert_eq!(s.phase, Phase::Idle);
1534 assert_eq!(s.turn_count, 0);
1535 assert!(s.last_interaction.is_some());
1536 assert!(s.ended_at.is_none());
1537 assert!(s.transcript_path.is_none());
1538 assert!(s.first_prompt.is_none());
1539 assert!(s.files_touched.is_empty());
1540 assert!(s.current_turn_started_at.is_none());
1541 }
1542
1543 #[test]
1544 fn test_make_view_name() {

Callers

nothing calls this directly

Calls 2

make_sessionFunction · 0.70
collectMethod · 0.45

Tested by

no test coverage detected