Просмотр исходного кода

[misc] RoomManagerTests: explicitly pass a cb to joinProject/joinDoc

Jakob Ackermann 6 лет назад
Родитель
Сommit
bea0e9beb7
1 измененных файлов с 4 добавлено и 4 удалено
  1. 4 4
      services/real-time/test/unit/js/RoomManagerTests.js

+ 4 - 4
services/real-time/test/unit/js/RoomManagerTests.js

@@ -113,7 +113,7 @@ describe('RoomManager', function () {
     })
     })
 
 
     return describe('when there are other clients in the project room', function () {
     return describe('when there are other clients in the project room', function () {
-      beforeEach(function () {
+      beforeEach(function (done) {
         this.RoomManager._clientsInRoom
         this.RoomManager._clientsInRoom
           .withArgs(this.client, this.project_id)
           .withArgs(this.client, this.project_id)
           .onFirstCall()
           .onFirstCall()
@@ -121,7 +121,7 @@ describe('RoomManager', function () {
           .onSecondCall()
           .onSecondCall()
           .returns(124)
           .returns(124)
         this.client.join = sinon.stub()
         this.client.join = sinon.stub()
-        return this.RoomManager.joinProject(this.client, this.project_id)
+        this.RoomManager.joinProject(this.client, this.project_id, done)
       })
       })
 
 
       it('should join the room using the id', function () {
       it('should join the room using the id', function () {
@@ -174,7 +174,7 @@ describe('RoomManager', function () {
     })
     })
 
 
     return describe('when there are other clients in the doc room', function () {
     return describe('when there are other clients in the doc room', function () {
-      beforeEach(function () {
+      beforeEach(function (done) {
         this.RoomManager._clientsInRoom
         this.RoomManager._clientsInRoom
           .withArgs(this.client, this.doc_id)
           .withArgs(this.client, this.doc_id)
           .onFirstCall()
           .onFirstCall()
@@ -182,7 +182,7 @@ describe('RoomManager', function () {
           .onSecondCall()
           .onSecondCall()
           .returns(124)
           .returns(124)
         this.client.join = sinon.stub()
         this.client.join = sinon.stub()
-        return this.RoomManager.joinDoc(this.client, this.doc_id)
+        this.RoomManager.joinDoc(this.client, this.doc_id, done)
       })
       })
 
 
       it('should join the room using the id', function () {
       it('should join the room using the id', function () {