fix tests

This commit is contained in:
Girish Ramakrishnan
2017-10-02 18:29:16 -07:00
parent 9e9b8b095e
commit 7bf70956a1
4 changed files with 7 additions and 7 deletions
+4 -4
View File
@@ -100,7 +100,7 @@ describe('backups', function () {
};
it('succeeds without backups', function (done) {
backups.cleanup(done);
backups.cleanup({ username: 'test' }, done);
});
it('succeeds with box backups, keeps latest', function (done) {
@@ -112,7 +112,7 @@ describe('backups', function () {
}, function (error) {
expect(error).to.not.be.ok();
backups.cleanup(function (error) {
backups.cleanup({ username: 'test' }, function (error) {
expect(error).to.not.be.ok();
backupdb.getByTypePaged(backupdb.BACKUP_TYPE_BOX, 1, 1000, function (error, result) {
@@ -133,7 +133,7 @@ describe('backups', function () {
});
it('does not remove expired backups if only one left', function (done) {
backups.cleanup(function (error) {
backups.cleanup({ username: 'test' }, function (error) {
expect(error).to.not.be.ok();
backupdb.getByTypePaged(backupdb.BACKUP_TYPE_BOX, 1, 1000, function (error, result) {
@@ -158,7 +158,7 @@ describe('backups', function () {
// wait for expiration
setTimeout(function () {
backups.cleanup(function (error) {
backups.cleanup({ username: 'test' }, function (error) {
expect(error).to.not.be.ok();
backupdb.getByTypePaged(backupdb.BACKUP_TYPE_APP, 1, 1000, function (error, result) {