Fix tests
This commit is contained in:
parent
994bc9279f
commit
161978ab05
|
@ -77,6 +77,7 @@ describe('joining a room', function () {
|
||||||
httpBackend.when('POST', '/filter').respond(200, { filter_id: 'fid' });
|
httpBackend.when('POST', '/filter').respond(200, { filter_id: 'fid' });
|
||||||
httpBackend.when('GET', '/sync').respond(200, {});
|
httpBackend.when('GET', '/sync').respond(200, {});
|
||||||
httpBackend.when('POST', '/publicRooms').respond(200, {chunk: []});
|
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 });
|
httpBackend.when('GET', '/directory/room/'+encodeURIComponent(ROOM_ALIAS)).respond(200, { room_id: ROOM_ID });
|
||||||
|
|
||||||
// start with a logged-in client
|
// start with a logged-in client
|
||||||
|
@ -132,6 +133,12 @@ describe('joining a room', function () {
|
||||||
httpBackend.when('POST', '/join/'+encodeURIComponent(ROOM_ALIAS))
|
httpBackend.when('POST', '/join/'+encodeURIComponent(ROOM_ALIAS))
|
||||||
.respond(200, {room_id: ROOM_ID});
|
.respond(200, {room_id: ROOM_ID});
|
||||||
return httpBackend.flush();
|
return httpBackend.flush();
|
||||||
|
}).then(() => {
|
||||||
|
// wait for the join request to be made
|
||||||
|
return q.delay(1);
|
||||||
|
}).then(() => {
|
||||||
|
// flush it through
|
||||||
|
return httpBackend.flush();
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
httpBackend.verifyNoOutstandingExpectation();
|
httpBackend.verifyNoOutstandingExpectation();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue