Merge pull request #2134 from matrix-org/dbkr/stub_getvisiblerooms

Add stub for getVisibleRooms()
pull/21833/head
David Baker 2018-08-23 13:53:27 +01:00 committed by GitHub
commit 7190fa301d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View File

@ -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) => {

View File

@ -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(),