Add explicit check for recovery password in AccountsManger#create

This commit is contained in:
Chris Eager authored and Ameya Lokare committed 2026-08-11 09:10:57 -07:00
1 parent e36e740bc0
commit fcf12face8
2 files changed
+15

No files matched your search

@@ -1658,6 +1658,17 @@ class AccountsManagerTest {
verify(phoneNumberIdentifiers).getPhoneNumberIdentifier(targetNumber);
}
@Test
void createAccountWithoutNumberOrRecoveryPassword() {
assertThrows(IllegalArgumentException.class,
() -> accountsManager.create(new AccountAttributes(),
Collections.emptyList(),
new IdentityKey(ECKeyPair.generate().getPublicKey()),
ReceiptCredentialTestUtil.receiptPresentation(),
mock(DeviceSpec.class),
null));
}
static Collection<Arguments> updateCurrentProfileVersion() {
final byte[] empty = new byte[0];