escape the email
This commit is contained in:
parent
1c08896f2d
commit
86152e3f99
|
@ -17,11 +17,16 @@ exports = module.exports = {
|
||||||
getOwner: getOwner,
|
getOwner: getOwner,
|
||||||
getAdmin: getAdmin,
|
getAdmin: getAdmin,
|
||||||
stripeSecret: stripeSecret,
|
stripeSecret: stripeSecret,
|
||||||
stripUnreachable: stripUnreachable
|
stripUnreachable: stripUnreachable,
|
||||||
|
regexp: regexp
|
||||||
};
|
};
|
||||||
|
|
||||||
var gEcosystem = safe.require(path.join(__dirname, '../secrets/e2e-test/ecosystem-staging.json'));
|
var gEcosystem = safe.require(path.join(__dirname, '../secrets/e2e-test/ecosystem-staging.json'));
|
||||||
|
|
||||||
|
function regexp(str) {
|
||||||
|
return new RegExp(str.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'));
|
||||||
|
}
|
||||||
|
|
||||||
function cloudronDomain(filename) {
|
function cloudronDomain(filename) {
|
||||||
return 't' + path.basename(filename.replace(/-/g,''), 'test.js') + '.selfhost.io';
|
return 't' + path.basename(filename.replace(/-/g,''), 'test.js') + '.selfhost.io';
|
||||||
}
|
}
|
||||||
|
|
|
@ -81,8 +81,8 @@ describe('Cloudron backup testing', function () {
|
||||||
|
|
||||||
it('did send mail from cloudron user', function (done) {
|
it('did send mail from cloudron user', function (done) {
|
||||||
imap.probe({
|
imap.probe({
|
||||||
subject: new RegExp('^Hi from e2e test - ' + cloudron.fqdn() + '$'),
|
subject: common.regexp('^Hi from e2e test - ' + cloudron.fqdn() + '$'),
|
||||||
to: new RegExp('test+' + cloudron.fqdn() + '@cloudron.io'),
|
to: common.regexp('test+' + cloudron.fqdn() + '@cloudron.io'),
|
||||||
body: /This release depends on you/
|
body: /This release depends on you/
|
||||||
}, done);
|
}, done);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue