mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Merge pull request #14409 from overleaf/jpa-open-source-history-v1-tests
[web] enable history-v1 tests for Server Pro/CE GitOrigin-RevId: 74119a09c101ed74c37833384722f85b0e3830dd
This commit is contained in:
parent
1a7b0f0414
commit
e23c2dafef
3 changed files with 14 additions and 2 deletions
|
@ -812,7 +812,12 @@ module.exports = {
|
|||
managedGroupEnrollmentInvite: [],
|
||||
},
|
||||
|
||||
moduleImportSequence: ['launchpad', 'server-ce-scripts', 'user-activate'],
|
||||
moduleImportSequence: [
|
||||
'history-v1',
|
||||
'launchpad',
|
||||
'server-ce-scripts',
|
||||
'user-activate',
|
||||
],
|
||||
|
||||
csp: {
|
||||
enabled: process.env.CSP_ENABLED === 'true',
|
||||
|
|
|
@ -295,6 +295,12 @@ describe('History', function () {
|
|||
(appRoute.route != null ? appRoute.route.path : undefined) ===
|
||||
'/api/projects/:project_id/version/:version/zip'
|
||||
)
|
||||
MockV1HistoryApi.app.get(
|
||||
'/api/projects/:project_id/version/:version/zip',
|
||||
(req, res, next) => {
|
||||
res.sendStatus(500)
|
||||
}
|
||||
)
|
||||
MockV1HistoryApi.app.post(
|
||||
'/api/projects/:project_id/version/:version/zip',
|
||||
(req, res, next) => {
|
||||
|
@ -309,7 +315,7 @@ describe('History', function () {
|
|||
MockV1HistoryApi.applyRoutes()
|
||||
})
|
||||
|
||||
it('should produce 404 when post request produces 404', function (done) {
|
||||
it('should produce 500', function (done) {
|
||||
this.owner.createProject('example-project', (error, projectId) => {
|
||||
if (error) {
|
||||
return done(error)
|
||||
|
|
|
@ -17,6 +17,7 @@ class MockV1HistoryApi extends AbstractMockApi {
|
|||
this.app.get(
|
||||
'/api/projects/:project_id/version/:version/zip',
|
||||
(req, res, next) => {
|
||||
this.sentChunks++
|
||||
zipAttachment(
|
||||
res,
|
||||
`Mock zip for ${req.params.project_id} at version ${req.params.version}`,
|
||||
|
|
Loading…
Reference in a new issue