add route to list backups by site
This commit is contained in:
@@ -32,6 +32,15 @@ describe('Backups API', function () {
|
||||
someBackup = response.body.backups[0];
|
||||
});
|
||||
|
||||
it('can list by site id', async function () {
|
||||
const site = await getDefaultBackupSite();
|
||||
const response = await superagent.get(`${serverUrl}/api/v1/backup_sites/${site.id}/backups`)
|
||||
.query({ access_token: admin.token });
|
||||
expect(response.status).to.equal(200);
|
||||
expect(response.body.backups.length).to.be(1);
|
||||
});
|
||||
|
||||
|
||||
it('cannot get random id', async function () {
|
||||
const response = await superagent.get(`${serverUrl}/api/v1/backups/bad_id`)
|
||||
.query({ access_token: owner.token })
|
||||
|
||||
Reference in New Issue
Block a user