From 161978ab05c5541d405acce7cd7ea23d3d4d8b71 Mon Sep 17 00:00:00 2001 From: David Baker Date: Fri, 16 Dec 2016 15:20:52 +0000 Subject: [PATCH] Fix tests --- test/app-tests/joining.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/app-tests/joining.js b/test/app-tests/joining.js index 989effa341..442b67c2db 100644 --- a/test/app-tests/joining.js +++ b/test/app-tests/joining.js @@ -77,6 +77,7 @@ describe('joining a room', function () { httpBackend.when('POST', '/filter').respond(200, { filter_id: 'fid' }); httpBackend.when('GET', '/sync').respond(200, {}); httpBackend.when('POST', '/publicRooms').respond(200, {chunk: []}); + httpBackend.when('GET', '/thirdparty/protocols').respond(200, {}); httpBackend.when('GET', '/directory/room/'+encodeURIComponent(ROOM_ALIAS)).respond(200, { room_id: ROOM_ID }); // start with a logged-in client @@ -132,6 +133,12 @@ describe('joining a room', function () { httpBackend.when('POST', '/join/'+encodeURIComponent(ROOM_ALIAS)) .respond(200, {room_id: ROOM_ID}); return httpBackend.flush(); + }).then(() => { + // wait for the join request to be made + return q.delay(1); + }).then(() => { + // flush it through + return httpBackend.flush(); }).then(() => { httpBackend.verifyNoOutstandingExpectation();