()
| 710 | |
| 711 | #[test] |
| 712 | fn test_derive_without_email() { |
| 713 | let user = UserIdentityInfo { |
| 714 | name: "Anonymous".to_string(), |
| 715 | email: None, |
| 716 | public_key_base32: "KEYDATA".to_string(), |
| 717 | }; |
| 718 | let options = AgentAuthorOptions { |
| 719 | agent_name: "gemini-cli", |
| 720 | agent_display_name: "Gemini CLI", |
| 721 | session_id: "abcdef1234", |
| 722 | identity_dir: None, |
| 723 | agent_identity: None, |
| 724 | }; |
| 725 | |
| 726 | let author = derive_agent_author(&user, &options); |
| 727 | |
| 728 | assert_eq!(author.name, "gemini+abcd"); |
| 729 | assert!(author.email.is_none()); |
| 730 | assert_eq!(author.identity, Some("KEYDATA".to_string())); |
| 731 | } |
| 732 | |
| 733 | #[test] |
| 734 | fn test_derive_with_date_prefix_session() { |
nothing calls this directly
no test coverage detected