()
| 1306 | |
| 1307 | #[test] |
| 1308 | fn test_author_display_different_agents() { |
| 1309 | let user = UserIdentityInfo { |
| 1310 | name: "Dev".to_string(), |
| 1311 | email: Some("dev@co.com".to_string()), |
| 1312 | public_key_base32: "KEY".to_string(), |
| 1313 | }; |
| 1314 | |
| 1315 | let agents = vec![ |
| 1316 | ("claude-code", "60f5cbd2", "claude+60f5 <dev@co.com>"), |
| 1317 | ("gemini-cli", "abcd1234", "gemini+abcd <dev@co.com>"), |
| 1318 | ("codex", "9876fedc", "codex+9876 <dev@co.com>"), |
| 1319 | ("open-code", "1111aaaa", "open+1111 <dev@co.com>"), |
| 1320 | ]; |
| 1321 | |
| 1322 | for (agent, session, expected) in agents { |
| 1323 | let options = AgentAuthorOptions { |
| 1324 | agent_name: agent, |
| 1325 | agent_display_name: agent, |
| 1326 | session_id: session, |
| 1327 | identity_dir: None, |
| 1328 | agent_identity: None, |
| 1329 | }; |
| 1330 | let author = derive_agent_author(&user, &options); |
| 1331 | assert_eq!( |
| 1332 | author.display_short(), |
| 1333 | expected, |
| 1334 | "Failed for agent: {}", |
| 1335 | agent |
| 1336 | ); |
| 1337 | } |
| 1338 | } |
| 1339 | } |
nothing calls this directly
no test coverage detected