rename function to listByTypePaged
This commit is contained in:
@@ -288,7 +288,7 @@ describe('backup cleaner', function () {
|
||||
it('succeeds with box backups, keeps latest', async function () {
|
||||
await cleanupBackups(site);
|
||||
|
||||
const results = await backups.getByTypePaged(backups.BACKUP_TYPE_BOX, 1, 1000);
|
||||
const results = await backups.listByTypePaged(backups.BACKUP_TYPE_BOX, 1, 1000);
|
||||
expect(results.length).to.equal(1);
|
||||
expect(results[0].id).to.equal(BACKUP_1_BOX.id);
|
||||
|
||||
@@ -300,7 +300,7 @@ describe('backup cleaner', function () {
|
||||
it('does not remove expired backups if only one left', async function () {
|
||||
await cleanupBackups(site);
|
||||
|
||||
const results = await backups.getByTypePaged(backups.BACKUP_TYPE_BOX, 1, 1000);
|
||||
const results = await backups.listByTypePaged(backups.BACKUP_TYPE_BOX, 1, 1000);
|
||||
expect(results[0].id).to.equal(BACKUP_1_BOX.id);
|
||||
|
||||
// check that app backups are also still there. backup_1 is still there
|
||||
@@ -318,7 +318,7 @@ describe('backup cleaner', function () {
|
||||
|
||||
await cleanupBackups(site);
|
||||
|
||||
let result = await backups.getByTypePaged(backups.BACKUP_TYPE_APP, 1, 1000);
|
||||
let result = await backups.listByTypePaged(backups.BACKUP_TYPE_APP, 1, 1000);
|
||||
expect(result.length).to.equal(4);
|
||||
result = result.sort((r1, r2) => r1.remotePath.localeCompare(r2.remotePath));
|
||||
expect(result[0].id).to.be(BACKUP_0_APP_0.id); // because app is installed, latest backup is preserved
|
||||
|
||||
Reference in New Issue
Block a user