mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-07 16:19:02 +02:00
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:
@@ -280,9 +280,6 @@ describe('UserMembershipController', function () {
|
||||
this.req.entity = this.subscription
|
||||
this.req.entityConfig = EntityConfigs.groupManagers
|
||||
this.res = new MockResponse()
|
||||
this.res.contentType = sinon.stub()
|
||||
this.res.header = sinon.stub()
|
||||
this.res.send = sinon.stub()
|
||||
return this.UserMembershipController.exportCsv(this.req, this.res)
|
||||
})
|
||||
|
||||
@@ -295,14 +292,14 @@ describe('UserMembershipController', function () {
|
||||
})
|
||||
|
||||
it('should set the correct content type on the request', function () {
|
||||
return assertCalledWith(this.res.contentType, 'text/csv')
|
||||
return assertCalledWith(this.res.contentType, 'text/csv; charset=utf-8')
|
||||
})
|
||||
|
||||
it('should name the exported csv file', function () {
|
||||
return assertCalledWith(
|
||||
this.res.header,
|
||||
'Content-Disposition',
|
||||
'attachment; filename=Group.csv'
|
||||
'attachment; filename="Group.csv"'
|
||||
)
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user