From cb84feefa928e5d8f5c98724844d3e327d50132e Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 23 Aug 2018 12:14:52 +0100 Subject: [PATCH] Add stub for getVisibleRooms() Fixes the tests --- test/components/views/rooms/RoomList-test.js | 1 + test/test-utils.js | 1 + 2 files changed, 2 insertions(+) diff --git a/test/components/views/rooms/RoomList-test.js b/test/components/views/rooms/RoomList-test.js index 1e9f80f161..fbb2dd4af9 100644 --- a/test/components/views/rooms/RoomList-test.js +++ b/test/components/views/rooms/RoomList-test.js @@ -94,6 +94,7 @@ describe('RoomList', () => { createRoom({tags: {'m.lowpriority': {}}, name: 'Some unimportant room'}), createRoom({tags: {'custom.tag': {}}, name: 'Some room customly tagged'}), ]; + client.getVisibleRooms = client.getRooms; const roomMap = {}; client.getRooms().forEach((r) => { diff --git a/test/test-utils.js b/test/test-utils.js index 25df9686ff..ef864bf9e0 100644 --- a/test/test-utils.js +++ b/test/test-utils.js @@ -74,6 +74,7 @@ export function createTestClient() { getPushActionsForEvent: sinon.stub(), getRoom: sinon.stub().returns(mkStubRoom()), getRooms: sinon.stub().returns([]), + getVisibleRooms: sinon.stub().returns([]), getGroups: sinon.stub().returns([]), loginFlows: sinon.stub(), on: sinon.stub(),