archives: add eventlog
This commit is contained in:
@@ -40,12 +40,12 @@ describe('Archives', function () {
|
||||
let archiveId;
|
||||
|
||||
it('cannot add bad backup to archives', async function () {
|
||||
const [error] = await safe(archives.add('badId', { appConfig }));
|
||||
const [error] = await safe(archives.add('badId', { appConfig }, auditSource));
|
||||
expect(error.reason).to.be(BoxError.NOT_FOUND);
|
||||
});
|
||||
|
||||
it('can add good backup to archives', async function () {
|
||||
archiveId = await archives.add(appBackup.id, { appConfig });
|
||||
archiveId = await archives.add(appBackup.id, { appConfig }, auditSource);
|
||||
});
|
||||
|
||||
it('cannot get invalid archive', async function () {
|
||||
@@ -72,12 +72,12 @@ describe('Archives', function () {
|
||||
});
|
||||
|
||||
it('cannot delete bad archive', async function () {
|
||||
const [error] = await safe(archives.del('badId', auditSource));
|
||||
const [error] = await safe(archives.del({ id: 'badId' }, auditSource));
|
||||
expect(error.reason).to.be(BoxError.NOT_FOUND);
|
||||
});
|
||||
|
||||
it('can del valid archive', async function () {
|
||||
await archives.del(archiveId, auditSource);
|
||||
await archives.del({ id: archiveId }, auditSource);
|
||||
const result = await archives.list(1, 10);
|
||||
expect(result.length).to.be(0);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user