db: check that partially revoked email addresses work correctly after publishing

This commit is contained in:
Vincent Breitmoser 2020-05-14 17:42:39 +02:00
parent cdda40e126
commit c3d4b448a5
No known key found for this signature in database
GPG Key ID: 7BD18320DEADFA11
1 changed files with 6 additions and 1 deletions

View File

@ -1001,7 +1001,12 @@ pub fn test_same_email_3(db: &mut impl Database, log_path: &Path) {
unparsed_uids: 0,
}, tpk_status);
// fetch by both user ids. We should still get both user ids.
assert_eq!(get_userids(&db.by_email(&email).unwrap()[..]),
vec![ uid2.clone() ]);
// make sure this survives depulication and publication of that same email address
db.set_email_unpublished(&fpr, &email);
db.set_email_published(&fpr, &email);
assert_eq!(get_userids(&db.by_email(&email).unwrap()[..]),
vec![ uid2.clone() ]);
}