Get project without doc lines in getAllFolders

This commit is contained in:
James Allen
2014-05-06 13:15:18 +01:00
parent 6a2370b5be
commit 2fb8b0e807
2 changed files with 9 additions and 1 deletions
@@ -64,6 +64,7 @@ describe 'ProjectEntityHandler', ->
'../Docstore/DocstoreManager': @DocstoreManager = {}
'logger-sharelatex':{log:->}
'./ProjectUpdateHandler': @projectUpdater
"./ProjectGetter": @ProjectGetter = {}
describe 'mkdirp', ->
@@ -507,12 +508,18 @@ describe 'ProjectEntityHandler', ->
folders : []
}]
]
@ProjectGetter.getProjectWithoutDocLines = sinon.stub().callsArgWith(1, null, @project)
describe "getAllFolders", ->
beforeEach ->
@callback = sinon.stub()
@ProjectEntityHandler.getAllFolders project_id, @callback
it "should get the project without the docs lines", ->
@ProjectGetter.getProjectWithoutDocLines
.calledWith(project_id)
.should.equal true
it "should call the callback with the folders", ->
@callback
.calledWith(null, {