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

Function test_new_session

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

Source from the content-addressed store, hash-verified

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