mirror of
https://github.com/signalapp/libsignal.git
synced 2026-05-03 13:02:20 +02:00
Add conversion tests for registration errors
This commit is contained in:
@@ -20,8 +20,6 @@ import {
|
||||
Environment,
|
||||
Net,
|
||||
newNativeHandle,
|
||||
RegistrationService,
|
||||
RegistrationSessionState,
|
||||
SIGNAL_TLS_PROXY_SCHEME,
|
||||
TokioAsyncContext,
|
||||
UnauthenticatedChatConnection,
|
||||
@@ -878,21 +876,3 @@ describe('cdsi lookup', () => {
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('registration client', () => {
|
||||
describe('registration session conversion', () => {
|
||||
const expectedSession: RegistrationSessionState = {
|
||||
allowedToRequestCode: true,
|
||||
verified: true,
|
||||
nextCallSecs: 123,
|
||||
nextSmsSecs: 456,
|
||||
nextVerificationAttemptSecs: 789,
|
||||
requestedInformation: new Set(['pushChallenge']),
|
||||
};
|
||||
|
||||
const convertedSession = RegistrationService._convertNativeSessionState(
|
||||
newNativeHandle(Native.TESTING_RegistrationSessionInfoConvert())
|
||||
);
|
||||
expect(convertedSession).to.deep.equal(expectedSession);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user