test(store): verify display names for accounts sharing an email

Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
Zyy
2026-12-01 11:56:13 +08:00
co-authored by Codex
parent 329503d967
commit 30bcff3419
@@ -572,18 +572,17 @@ async fn diagnostics_should_group_same_email_accounts_by_stable_ref() {
.await
.expect("account diagnostics")
.items;
assert_eq!(diagnostics.len(), 2);
assert_eq!(
diagnostics
.iter()
.map(|item| item.key.as_str())
.map(|item| (item.key.as_str(), item.name.as_str()))
.collect::<Vec<_>>(),
vec!["acct_snap_a", "acct_snap_b"]
[("acct_snap_a", "Alpha"), ("acct_snap_b", "Beta")]
);
assert!(
diagnostics
.iter()
.all(|item| item.name == "same@example.invalid")
.all(|item| item.account_email.as_deref() == Some("same@example.invalid"))
);
assert!(diagnostics.iter().all(|item| item.request_count == 1));