You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-29 16:43:09 +03:00
Fix some broken tests
A number of the tests appear to have been broken since 90c919e without anyone
noticing; fix them.
This commit is contained in:
@@ -560,8 +560,8 @@ MatrixClient.prototype.listDeviceKeys = function(userId) {
|
||||
result.push({
|
||||
id: deviceId,
|
||||
key: ed25519Key,
|
||||
verified: device.verified == DeviceVerification.VERIFIED,
|
||||
blocked: device.verified == DeviceVerification.BLOCKED,
|
||||
verified: Boolean(device.verified == DeviceVerification.VERIFIED),
|
||||
blocked: Boolean(device.verified == DeviceVerification.BLOCKED),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -169,14 +169,18 @@ function aliDownloadsKeys() {
|
||||
id: "bvcxz",
|
||||
key: bobDeviceEd25519Key,
|
||||
verified: false,
|
||||
blocked: false,
|
||||
}]);
|
||||
});
|
||||
var p2 = aliQueryKeys();
|
||||
|
||||
// check that the localStorage is updated as we expect (not sure this is
|
||||
// an integration test, but meh)
|
||||
return q.all([p1, p2]).then(function() {
|
||||
var devices = aliStorage.getEndToEndDevicesForUser(bobUserId);
|
||||
expect(devices[bobDeviceId].keys).toEqual(bobDeviceKeys.keys);
|
||||
expect(devices[bobDeviceId].verified).toBe(false);
|
||||
expect(devices[bobDeviceId].verified).
|
||||
toBe(0); // DeviceVerification.UNVERIFIED
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -199,14 +199,14 @@ describe("MatrixClient", function() {
|
||||
expect(res).toEqual({
|
||||
boris: {
|
||||
dev1: {
|
||||
verified: false,
|
||||
verified: 0, // DeviceVerification.UNVERIFIED
|
||||
keys: { "ed25519:dev1": "k1" },
|
||||
algorithms: ["1"],
|
||||
},
|
||||
},
|
||||
chaz: {
|
||||
dev2: {
|
||||
verified: false,
|
||||
verified: 0, // DeviceVerification.UNVERIFIED
|
||||
keys: { "ed25519:dev2" : "k2" },
|
||||
algorithms: ["2"],
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user