pass in userId with room in test

This commit is contained in:
Bruno Windels 2018-08-02 11:40:25 +02:00
parent 0dd860242a
commit b9bbb7ee16
2 changed files with 9 additions and 8 deletions

View File

@ -84,7 +84,7 @@ ConferenceCall.prototype._getConferenceUserRoom = function() {
preset: "private_chat", preset: "private_chat",
invite: [this.confUserId] invite: [this.confUserId]
}).then(function(res) { }).then(function(res) {
return new Room(res.room_id); return new Room(res.room_id, client.getUserId());
}); });
}; };

View File

@ -20,15 +20,16 @@ function generateRoomId() {
return '!' + Math.random().toString().slice(2, 10) + ':domain'; return '!' + Math.random().toString().slice(2, 10) + ':domain';
} }
function createRoom(opts) {
const room = new Room(generateRoomId()); describe('RoomList', () => {
function createRoom(opts) {
const room = new Room(generateRoomId(), client.getUserId());
if (opts) { if (opts) {
Object.assign(room, opts); Object.assign(room, opts);
} }
return room; return room;
} }
describe('RoomList', () => {
let parentDiv = null; let parentDiv = null;
let sandbox = null; let sandbox = null;
let client = null; let client = null;