message: Add tests for was verified case
diff: @@ -6,7 +6,7 @@ function mkClient(selfTrust) {
  getUserId: () => "@self:localhost",
  checkUserTrust: (userId) => ({
  isCrossSigningVerified: () => userId[1] == "T",
  - wasCrossSigningVerified: () => userId[1] == "T",
  + wasCrossSigningVerified: () => userId[1] == "T" || userId[1] == "W",
  }),
  checkDeviceTrust: (userId, deviceId) => ({
  isVerified: () => userId === "@self:localhost" ? selfTrust : userId[2] == "T",
  @@ -168,4 +168,16 @@ describe("shieldStatusForMembership other-trust behaviour", function() {
  const status = await shieldStatusForRoom(client, room);
  expect(status).toEqual(result);
  });
  +
  + it.each(
  + [["warning", true], ["warning", false]],
  + )("2 was verified: returns '%s', DM = %s", async (result, dm) => {
  + const client = mkClient(true);
  + const room = {
  + roomId: dm ? "DM" : "other",
  + getEncryptionTargetMembers: () => ["@self:localhost", "@WF:h", "@FT:h"].map((userId) => ({userId})),
  + };
  + const status = await shieldStatusForRoom(client, room);
  + expect(status).toEqual(result);
  + });
  });
  