check tz
This commit is contained in:
parent
4a87988bf2
commit
4e4054c83f
@ -317,6 +317,12 @@ Cloudron.prototype.reboot = function () {
|
|||||||
this.waitForBox();
|
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) {
|
Cloudron.prototype.checkA = function (callback) {
|
||||||
var that = this;
|
var that = this;
|
||||||
dns.resolve4(this._box.domain, function (error, records) {
|
dns.resolve4(this._box.domain, function (error, records) {
|
||||||
|
@ -63,6 +63,10 @@ describe('Appstore new user flow', function () {
|
|||||||
cloudron.setCredentials(owner.password, token);
|
cloudron.setCredentials(owner.password, token);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('can get the timezone', function () {
|
||||||
|
cloudron.checkTimezone('America/New_York');
|
||||||
|
});
|
||||||
|
|
||||||
var location = 'haste' + (Math.random() * 10000).toFixed();
|
var location = 'haste' + (Math.random() * 10000).toFixed();
|
||||||
it('can install app', function () {
|
it('can install app', function () {
|
||||||
var manifest = appStore.getManifest('com.hastebin.cloudronapp', '0.3.0');
|
var manifest = appStore.getManifest('com.hastebin.cloudronapp', '0.3.0');
|
||||||
|
Loading…
Reference in New Issue
Block a user