fix regexp

This commit is contained in:
Girish Ramakrishnan 2016-06-23 15:55:28 -05:00
parent d000e36ed7
commit 359fcae054
2 changed files with 2 additions and 2 deletions

View File

@ -129,7 +129,7 @@ function searchMessage(message, needle) {
assert.strictEqual(typeof message, 'object');
assert.strictEqual(typeof needle, 'object');
debug('searchMessage : %s %s %s %j', message.seqno, message.from, message.to, message.subject);
debug('searchMessage : %s %s %s %s', message.seqno, message.from[0], message.to[0], message.subject[0]);
if (needle.subject && message.subject[0].match(needle.subject) === null) return false;
if (needle.body && message.body.match(needle.body) === null) return false;

View File

@ -66,7 +66,7 @@ describe('Appstore new user flow', function () {
it('sent a mail to the user about cloudron ready', function (done) {
imap.probe({
subject: /^Cloudron tappflow.selfhost.io is ready$/,
subject: new RegExp('Cloudron ' + box.domain + ' is ready$'),
from: /Cloudron Team/
}, done);
});