From 8663dba37ce18b6d1800154f1a8ef1f0aa632dbe Mon Sep 17 00:00:00 2001 From: Hayden Faulds Date: Wed, 20 Dec 2017 15:14:56 +0000 Subject: [PATCH] remove unused EditorController.getListOfDocPaths --- .../Features/Editor/EditorController.coffee | 6 ------ .../coffee/Editor/EditorControllerTests.coffee | 15 --------------- 2 files changed, 21 deletions(-) diff --git a/services/web/app/coffee/Features/Editor/EditorController.coffee b/services/web/app/coffee/Features/Editor/EditorController.coffee index 532f515a10..4019a9f383 100644 --- a/services/web/app/coffee/Features/Editor/EditorController.coffee +++ b/services/web/app/coffee/Features/Editor/EditorController.coffee @@ -126,12 +126,6 @@ module.exports = EditorController = if callback? callback() - getListOfDocPaths: (project_id, callback)-> - ProjectEntityHandler.getAllDocs project_id, (err, docs)-> - docList = _.map docs, (doc, path)-> - return {_id:doc._id, path:path.substring(1)} - callback(null, docList) - notifyUsersProjectHasBeenDeletedOrRenamed: (project_id, callback)-> EditorRealTimeController.emitToRoom(project_id, 'projectRenamedOrDeletedByExternalSource') callback() diff --git a/services/web/test/unit/coffee/Editor/EditorControllerTests.coffee b/services/web/test/unit/coffee/Editor/EditorControllerTests.coffee index 85760f510d..1a8065efb1 100644 --- a/services/web/test/unit/coffee/Editor/EditorControllerTests.coffee +++ b/services/web/test/unit/coffee/Editor/EditorControllerTests.coffee @@ -424,21 +424,6 @@ describe "EditorController", -> .calledWith(@project_id, "removeEntity", @entity_id, @source) .should.equal true - describe "getting a list of project paths", -> - - it 'should call the project entity handler to get an array of docs', (done)-> - fullDocsHash = - "/doc1.tex":{lines:["das"], _id:"1234"} - "/doc2.tex":{lines:["dshajkh"]} - project_id = "d312nkjnajn" - @ProjectEntityHandler.getAllDocs = sinon.stub().callsArgWith(1, null, fullDocsHash) - @EditorController.getListOfDocPaths project_id, (err, returnedDocs)-> - returnedDocs.length.should.equal 2 - returnedDocs[0]._id.should.equal "1234" - assert.equal returnedDocs[0].lines, undefined - returnedDocs[1].path.should.equal "doc2.tex" - done() - describe "notifyUsersProjectHasBeenDeletedOrRenamed", -> it 'should emmit a message to all users in a project', (done)-> @EditorRealTimeController.emitToRoom = sinon.stub()