Clear username links in the same transaction when clearing username hashes

This commit is contained in:
Jon Chambers
2023-10-18 12:49:32 -04:00
committed by Jon Chambers
parent ac0c8b1e9a
commit 6441d5838d
3 changed files with 14 additions and 3 deletions

View File

@@ -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