This commit is contained in:
Girish Ramakrishnan 2016-05-03 12:23:34 -07:00
parent 4a87988bf2
commit 4e4054c83f
2 changed files with 10 additions and 0 deletions

View File

@ -317,6 +317,12 @@ Cloudron.prototype.reboot = function () {
this.waitForBox();
};
Cloudron.prototype.checkTimeZone = function (tz) {
var res = request.get(this._origin + '/api/v1/settings/time_zone').query({ access_token: this._credentials.accessToken }).end();
common.verifyResponse2xx(res, 'Could not query timezone');
if (tz !== res.body.timeZone) throw new Error('timezone does not match. expecting: %s got %s', tz, result.body.timeZone);
};
Cloudron.prototype.checkA = function (callback) {
var that = this;
dns.resolve4(this._box.domain, function (error, records) {

View File

@ -63,6 +63,10 @@ describe('Appstore new user flow', function () {
cloudron.setCredentials(owner.password, token);
});
it('can get the timezone', function () {
cloudron.checkTimezone('America/New_York');
});
var location = 'haste' + (Math.random() * 10000).toFixed();
it('can install app', function () {
var manifest = appStore.getManifest('com.hastebin.cloudronapp', '0.3.0');