Merge pull request #6317 from overleaf/jpa-send-explicit-content-type

[web] send explicit content type in responses

GitOrigin-RevId: d5aeaba57a7d2fc053fbf5adc2299fb46e435341
This commit is contained in:
Jakob Ackermann
2022-01-18 09:03:18 +00:00
committed by Copybot
parent c97e95aeba
commit d720d6affa
43 changed files with 390 additions and 224 deletions
@@ -784,7 +784,7 @@ describe('CompileController', function () {
.yields(null, { content: 'body' })
this.req.params = { Project_id: this.project_id }
this.req.query = { clsiserverid: 'node-42' }
this.res.send = sinon.stub()
this.res.json = sinon.stub()
this.res.contentType = sinon.stub()
return this.CompileController.wordCount(this.req, this.res, this.next)
})
@@ -796,7 +796,7 @@ describe('CompileController', function () {
})
it('should return a 200 and body', function () {
return this.res.send.calledWith({ content: 'body' }).should.equal(true)
return this.res.json.calledWith({ content: 'body' }).should.equal(true)
})
})
})