mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-29 20:11:32 +02:00
Revert "Revert "add ensureRootDocumentIsValidForProject method""
This reverts commit 80bb46f92f200f48fc39138afb27df729959888c. GitOrigin-RevId: aced9579ed1f4b0ab1780be0f4f45ae8d6a405a5
This commit is contained in:
@@ -575,13 +575,13 @@ describe('ProjectRootDocManager', function() {
|
||||
|
||||
describe('ensureRootDocumentIsValid', function() {
|
||||
beforeEach(function() {
|
||||
this.project = {}
|
||||
this.project = { _id: this.project_id }
|
||||
this.ProjectGetter.getProject = sinon
|
||||
.stub()
|
||||
.callsArgWith(2, null, this.project)
|
||||
this.ProjectEntityUpdateHandler.setRootDoc = sinon.stub().yields()
|
||||
this.ProjectEntityUpdateHandler.unsetRootDoc = sinon.stub().yields()
|
||||
this.ProjectEntityHandler.getAllDocPathsFromProjectById = sinon
|
||||
this.ProjectEntityHandler.getAllDocPathsFromProject = sinon
|
||||
.stub()
|
||||
.callsArgWith(1, null, this.docPaths)
|
||||
return (this.ProjectRootDocManager.setRootDocAutomatically = sinon
|
||||
@@ -599,9 +599,9 @@ describe('ProjectRootDocManager', function() {
|
||||
)
|
||||
})
|
||||
|
||||
it('should find the project fetching only the rootDoc_id field', function() {
|
||||
it('should find the project fetching only the rootDoc_id and rootFolder fields', function() {
|
||||
return this.ProjectGetter.getProject
|
||||
.calledWith(this.project_id, { rootDoc_id: 1 })
|
||||
.calledWith(this.project_id, { rootDoc_id: 1, rootFolder: 1 })
|
||||
.should.equal(true)
|
||||
})
|
||||
|
||||
@@ -625,9 +625,9 @@ describe('ProjectRootDocManager', function() {
|
||||
)
|
||||
})
|
||||
|
||||
it('should find the project fetching only the rootDoc_id field', function() {
|
||||
it('should find the project fetching only the rootDoc_id and rootFolder fields', function() {
|
||||
return this.ProjectGetter.getProject
|
||||
.calledWith(this.project_id, { rootDoc_id: 1 })
|
||||
.calledWith(this.project_id, { rootDoc_id: 1, rootFolder: 1 })
|
||||
.should.equal(true)
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user