check mail in update and backup tests

This commit is contained in:
Girish Ramakrishnan 2016-05-18 18:48:15 -07:00
parent a2b9e4f66a
commit df9f5f2e2e
3 changed files with 18 additions and 2 deletions

View File

@ -10,7 +10,7 @@ var AppStore = require('../appstore.js'),
Cloudron = require('../cloudron.js'),
common = require('../common.js'),
dnsSync = require('dns-sync'),
request = require('superagent-sync'),
mailer = require('../mailer.js'),
sleep = require('sleep').sleep;
require('colors');
@ -55,6 +55,10 @@ describe('Cloudron backup testing', function () {
cloudron.setCredentials(owner.password, token);
});
it('send mail to cloudron user', function (done) {
mailer.sendMailToCloudronUser(owner.username + '@' + box.domain, done);
});
var location = 'test' + (Math.random() * 10000).toFixed();
it('can install app', function () {
var manifest = appStore.getManifest(common.TESTAPP_ID, common.TESTAPP_VERSION);
@ -106,6 +110,10 @@ describe('Cloudron backup testing', function () {
cloudron.uninstallApp(appId);
});
it('can check mail', function (done) {
cloudron.checkMail(owner, done);
});
it('can delete the cloudron', function () {
appStore.deleteCloudron(box);
});

View File

@ -11,6 +11,7 @@ var AppStore = require('../appstore.js'),
assert = require('assert'),
Cloudron = require('../cloudron.js'),
common = require('../common.js'),
mailer = require('../mailer.js'),
request = require('superagent-sync'),
semver = require('semver'),
sleep = require('sleep').sleep;
@ -65,6 +66,10 @@ describe('Cloudron update testing', function () {
cloudron.activate(owner);
});
it('send mail to cloudron user', function (done) {
mailer.sendMailToCloudronUser(owner.username + '@' + box.domain, done);
});
it('can login to the box', function () {
var token = cloudron.getOauthToken(owner);
cloudron.setCredentials(owner.password, token);
@ -114,6 +119,10 @@ describe('Cloudron update testing', function () {
cloudron.uninstallApp(appId);
});
it('can check mail', function (done) {
cloudron.checkMail(owner, done);
});
it('can delete the cloudron', function () {
appStore.deleteCloudron(box);
});

View File

@ -101,7 +101,6 @@ describe('Custom domain test', function () {
cloudron.setCredentials(owner.password, token);
});
it('send mail to cloudron user', function (done) {
mailer.sendMailToCloudronUser(owner.username + '@' + CUSTOM_DOMAIN, done);
});