settings: add update config

This commit is contained in:
girish@cloudron.io
2016-01-23 05:06:09 -08:00
parent b2da364345
commit 3a6b9c23c6
2 changed files with 46 additions and 3 deletions

View File

@@ -123,10 +123,25 @@ describe('Settings', function () {
});
it('can get backup config', function (done) {
settings.getBackupConfig(function (error, dnsConfig) {
settings.getBackupConfig(function (error, backupConfig) {
expect(error).to.be(null);
expect(dnsConfig.provider).to.be('caas');
expect(dnsConfig.token).to.be('TOKEN');
expect(backupConfig.provider).to.be('caas');
expect(backupConfig.token).to.be('TOKEN');
done();
});
});
it('can set backup config', function (done) {
settings.setUpdateConfig({ prerelease: true }, function (error) {
expect(error).to.be(null);
done();
});
});
it('can get backup config', function (done) {
settings.getUpdateConfig(function (error, updateConfig) {
expect(error).to.be(null);
expect(updateConfig.prerelease).to.be(true);
done();
});
});