feat: Allow export of collections as sync zip (#1013)

* feat: Allow export of collections as sync zip

* test: Add spec
This commit is contained in:
Tom Moor
2019-08-09 20:37:51 -07:00
committed by GitHub
parent d024d31f66
commit f87b561685
4 changed files with 49 additions and 42 deletions

View File

@ -120,6 +120,18 @@ describe('#collections.exportAll', async () => {
expect(res.status).toEqual(200);
});
it('should allow downloading directly', async () => {
const { admin } = await seed();
const res = await server.post('/api/collections.exportAll', {
body: { token: admin.getJwtToken(), download: true },
});
expect(res.status).toEqual(200);
expect(res.headers.get('content-type')).toEqual(
'application/force-download'
);
});
});
describe('#collections.add_user', async () => {