optimize rootDoc_id validation
GitOrigin-RevId: f19d02674f7d0d47531be7586bc47628601a7231
This commit is contained in:
@@ -24,6 +24,9 @@ describe('ClsiManager', function() {
|
||||
this.DocumentUpdaterHandler = {
|
||||
getProjectDocsIfMatch: sinon.stub().callsArgWith(2, null, null)
|
||||
}
|
||||
this.ProjectRootDocManager = {
|
||||
setRootDocAutomatically: sinon.stub().yields()
|
||||
}
|
||||
this.logger = {
|
||||
log: sinon.stub(),
|
||||
error: sinon.stub(),
|
||||
@@ -63,6 +66,7 @@ describe('ClsiManager', function() {
|
||||
},
|
||||
'../Project/ProjectEntityHandler': this.ProjectEntityHandler,
|
||||
'../Project/ProjectGetter': this.ProjectGetter,
|
||||
'../Project/ProjectRootDocManager': this.ProjectRootDocManager,
|
||||
'../DocumentUpdater/DocumentUpdaterHandler': this
|
||||
.DocumentUpdaterHandler,
|
||||
'./ClsiCookieManager': () => this.ClsiCookieManager,
|
||||
|
||||
@@ -76,7 +76,7 @@ describe('CompileManager', function() {
|
||||
this.CompileManager._checkIfRecentlyCompiled = sinon
|
||||
.stub()
|
||||
.callsArgWith(2, null, false)
|
||||
this.ProjectRootDocManager.ensureRootDocumentIsValid = sinon
|
||||
this.ProjectRootDocManager.ensureRootDocumentIsSet = sinon
|
||||
.stub()
|
||||
.callsArgWith(1, null)
|
||||
this.CompileManager.getProjectCompileLimits = sinon
|
||||
@@ -115,7 +115,7 @@ describe('CompileManager', function() {
|
||||
})
|
||||
|
||||
it('should ensure that the root document is set', function() {
|
||||
return this.ProjectRootDocManager.ensureRootDocumentIsValid
|
||||
return this.ProjectRootDocManager.ensureRootDocumentIsSet
|
||||
.calledWith(this.project_id)
|
||||
.should.equal(true)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user