Revert "Revert "clear rootDoc_id when deleting doc, reset on compiles if invalid""

This reverts commit 7acba5876581044a08d6deb4767a4a2196dcb765.

GitOrigin-RevId: 034ae6fa4d8515944683395ef14d99801829cb6a
This commit is contained in:
Ersun Warncke
2020-02-12 04:19:41 +00:00
committed by Copybot
parent a581ef7609
commit 93bf7cc4db
5 changed files with 83 additions and 21 deletions
@@ -120,14 +120,12 @@ describe('CompileController', function() {
})
it('should set the content-type of the response to application/json', function() {
return this.res.contentType
.calledWith('application/json')
.should.equal(true)
this.res.type.should.equal('application/json')
})
it('should send a successful response reporting the status and files', function() {
this.res.statusCode.should.equal(200)
return this.res.body.should.equal(
this.res.body.should.equal(
JSON.stringify({
status: this.status,
outputFiles: this.outputFiles
@@ -76,7 +76,7 @@ describe('CompileManager', function() {
this.CompileManager._checkIfRecentlyCompiled = sinon
.stub()
.callsArgWith(2, null, false)
this.ProjectRootDocManager.ensureRootDocumentIsSet = sinon
this.ProjectRootDocManager.ensureRootDocumentIsValid = 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.ensureRootDocumentIsSet
return this.ProjectRootDocManager.ensureRootDocumentIsValid
.calledWith(this.project_id)
.should.equal(true)
})