fix tests for real
This commit is contained in:
parent
f3f3231df6
commit
c94e41d393
|
@ -179,12 +179,9 @@ class OlmManager {
|
|||
: null,
|
||||
oneTimeKeys: signedOneTimeKeys,
|
||||
);
|
||||
if (response['signed_curve25519'] != oneTimeKeysCount) {
|
||||
return false;
|
||||
}
|
||||
_olmAccount.mark_keys_as_published();
|
||||
await client.database?.updateClientKeys(pickledOlmAccount, client.id);
|
||||
return true;
|
||||
return response['signed_curve25519'] == oneTimeKeysCount;
|
||||
}
|
||||
|
||||
void handleDeviceOneTimeKeysCount(Map<String, int> countJson) {
|
||||
|
|
|
@ -159,7 +159,7 @@ void main() {
|
|||
expect(presenceCounter, 1);
|
||||
expect(accountDataCounter, 3);
|
||||
await Future.delayed(Duration(milliseconds: 50));
|
||||
expect(matrix.userDeviceKeys.length, 3);
|
||||
expect(matrix.userDeviceKeys.length, 4);
|
||||
expect(matrix.userDeviceKeys['@alice:example.com'].outdated, false);
|
||||
expect(matrix.userDeviceKeys['@alice:example.com'].deviceKeys.length, 2);
|
||||
expect(
|
||||
|
@ -178,7 +178,7 @@ void main() {
|
|||
}
|
||||
}));
|
||||
await Future.delayed(Duration(milliseconds: 50));
|
||||
expect(matrix.userDeviceKeys.length, 2);
|
||||
expect(matrix.userDeviceKeys.length, 3);
|
||||
expect(matrix.userDeviceKeys['@alice:example.com'].outdated, true);
|
||||
|
||||
await matrix.handleSync(SyncUpdate.fromJson({
|
||||
|
|
|
@ -1598,7 +1598,7 @@ class FakeMatrixApi extends MockClient {
|
|||
'/client/r0/keys/upload': (var req) => {
|
||||
'one_time_key_counts': {
|
||||
'curve25519': 10,
|
||||
'signed_curve25519': 66,
|
||||
'signed_curve25519': json.decode(req)['one_time_keys']?.keys?.length ?? 0,
|
||||
}
|
||||
},
|
||||
'/client/r0/keys/query': (var req) => {
|
||||
|
|
Loading…
Reference in a new issue