()
| 515 | |
| 516 | #[test] |
| 517 | fn test_derive_without_email() { |
| 518 | let user = UserIdentityInfo { |
| 519 | name: "Anonymous".to_string(), |
| 520 | email: None, |
| 521 | public_key_base32: "KEYDATA".to_string(), |
| 522 | }; |
| 523 | let options = AgentAuthorOptions { |
| 524 | agent_name: "gemini-cli", |
| 525 | agent_display_name: "Gemini CLI", |
| 526 | session_id: "abcdef1234", |
| 527 | identity_dir: None, |
| 528 | }; |
| 529 | |
| 530 | let author = derive_agent_author(&user, &options); |
| 531 | |
| 532 | assert_eq!(author.name, "gemini+abcd"); |
| 533 | assert!(author.email.is_none()); |
| 534 | assert_eq!(author.identity, Some("KEYDATA".to_string())); |
| 535 | } |
| 536 | |
| 537 | #[test] |
| 538 | fn test_derive_with_date_prefix_session() { |
nothing calls this directly
no test coverage detected