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-17 10:19:53 +00:00
committed by Copybot
parent c97e95aeba
commit d720d6affa
43 changed files with 390 additions and 224 deletions

View File

@@ -343,7 +343,7 @@ describe('ProjectController', function () {
describe('cloneProject', function () {
it('should call the project duplicator', function (done) {
this.res.send = json => {
this.res.json = json => {
this.ProjectDuplicator.duplicate
.calledWith(this.user, this.project_id, this.projectName)
.should.equal(true)
@@ -357,7 +357,7 @@ describe('ProjectController', function () {
describe('newProject', function () {
it('should call the projectCreationHandler with createExampleProject', function (done) {
this.req.body.template = 'example'
this.res.send = json => {
this.res.json = json => {
this.ProjectCreationHandler.createExampleProject
.calledWith(this.user._id, this.projectName)
.should.equal(true)
@@ -371,7 +371,7 @@ describe('ProjectController', function () {
it('should call the projectCreationHandler with createBasicProject', function (done) {
this.req.body.template = 'basic'
this.res.send = json => {
this.res.json = json => {
this.ProjectCreationHandler.createExampleProject.called.should.equal(
false
)