From b9bbb7ee16c300bd2bb3741365a8929de9bfa1fb Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Thu, 2 Aug 2018 11:40:25 +0200 Subject: [PATCH] pass in userId with room in test --- src/VectorConferenceHandler.js | 2 +- test/components/views/rooms/RoomList-test.js | 15 ++++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/VectorConferenceHandler.js b/src/VectorConferenceHandler.js index 19081726b2..af6659d343 100644 --- a/src/VectorConferenceHandler.js +++ b/src/VectorConferenceHandler.js @@ -84,7 +84,7 @@ ConferenceCall.prototype._getConferenceUserRoom = function() { preset: "private_chat", invite: [this.confUserId] }).then(function(res) { - return new Room(res.room_id); + return new Room(res.room_id, client.getUserId()); }); }; diff --git a/test/components/views/rooms/RoomList-test.js b/test/components/views/rooms/RoomList-test.js index c0a0b8eb67..8a596d4151 100644 --- a/test/components/views/rooms/RoomList-test.js +++ b/test/components/views/rooms/RoomList-test.js @@ -20,15 +20,16 @@ function generateRoomId() { return '!' + Math.random().toString().slice(2, 10) + ':domain'; } -function createRoom(opts) { - const room = new Room(generateRoomId()); - if (opts) { - Object.assign(room, opts); - } - return room; -} describe('RoomList', () => { + function createRoom(opts) { + const room = new Room(generateRoomId(), client.getUserId()); + if (opts) { + Object.assign(room, opts); + } + return room; + } + let parentDiv = null; let sandbox = null; let client = null;