Clear username links in the same transaction when clearing username hashes

This commit is contained in:
Jon Chambers authored and Jon Chambers committed 2023-10-20 10:51:50 -04:00
1 parent ac0c8b1e9a
commit 6441d5838d
3 files changed
+14 -3

No files matched your search

@@ -837,7 +837,11 @@ class AccountsTest {
assertThat(accounts.getByUsernameHash(USERNAME_HASH_1).join()).isEmpty();
assertThat(accounts.getByAccountIdentifier(account.getUuid()))
.hasValueSatisfying(clearedAccount -> assertThat(clearedAccount.getUsernameHash()).isEmpty());
.hasValueSatisfying(clearedAccount -> {
assertThat(clearedAccount.getUsernameHash()).isEmpty();
assertThat(clearedAccount.getUsernameLinkHandle()).isNull();
assertThat(clearedAccount.getEncryptedUsername().isEmpty());
});
}
@Test