mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-08-04 20:34:14 +01:00
Do not allow re-registers to restore data in regV5.
This commit is contained in:
+14
@@ -1387,6 +1387,20 @@ class RegistrationEndToEndTest {
|
||||
}
|
||||
}
|
||||
|
||||
private fun preExistingRegistrationData(e164: String): PreExistingRegistrationData {
|
||||
return PreExistingRegistrationData(
|
||||
e164 = e164,
|
||||
aci = ACI.from(UUID.randomUUID()),
|
||||
pni = PNI.from(UUID.randomUUID()),
|
||||
servicePassword = "service-password",
|
||||
aep = AccountEntropyPool.generate(),
|
||||
registrationLockEnabled = false,
|
||||
unrestrictedUnidentifiedAccess = false,
|
||||
aciIdentityKeyPair = IdentityKeyPair.generate(),
|
||||
pniIdentityKeyPair = IdentityKeyPair.generate()
|
||||
)
|
||||
}
|
||||
|
||||
private fun createMockPermissionsState(): MockMultiplePermissionsState {
|
||||
return MockMultiplePermissionsState(
|
||||
allPermissionsGranted = true,
|
||||
|
||||
+1
-1
@@ -632,7 +632,7 @@ class VerificationCodeViewModelTest {
|
||||
|
||||
viewModel.applyEvent(initialState, VerificationCodeScreenEvents.CodeEntered("123456"), stateEmitter)
|
||||
|
||||
assertThat(emittedEvents[1])
|
||||
assertThat(emittedEvents[2])
|
||||
.isInstanceOf<RegistrationFlowEvent.NavigateToScreen>()
|
||||
.prop(RegistrationFlowEvent.NavigateToScreen::route)
|
||||
.isInstanceOf<RegistrationRoute.PinEntryForSvrRestore>()
|
||||
|
||||
Reference in New Issue
Block a user