fix(core): update

This commit is contained in:
2020-08-13 00:32:05 +00:00
parent 3abc973d88
commit 4cb32e8460
6 changed files with 83 additions and 37 deletions

View File

@ -12,6 +12,7 @@ let testSmartmail: smartmail.Smartmail<IMailgunMessage>;
tap.test('should create a mailgun account', async () => {
testMailgunAccount = new mailgun.MailgunAccount(testQenv.getEnvVarOnDemand('MAILGUN_API_TOKEN'));
testMailgunAccount.addSmtpCredentials(testQenv.getEnvVarOnDemand('MAILGUN_SMTP_CREDENTIALS'));
expect(testMailgunAccount).to.be.instanceOf(mailgun.MailgunAccount);
});
@ -21,7 +22,7 @@ tap.test('should create a smartmail', async () => {
from: 'Lossless GmbH <noreply@mail.lossless.com>',
subject: 'TestMessage from @mojoio/mailgun test'
});
return testSmartmail;
expect(testSmartmail).to.be.instanceOf(smartmail.Smartmail);
});
tap.test('should send a smartmail', async () => {
@ -31,12 +32,10 @@ tap.test('should send a smartmail', async () => {
tap.test('should send a smartmail with empty body', async () => {
const emptyBodySmartmail = new smartmail.Smartmail<IMailgunMessage>({
body: '',
from: 'Lossless GmbH <noreply@mail.lossless.com>',
from: 'Lossless GmbH <noreply@mail.lossless.one>',
subject: 'A message with no body from @mojoio/mailgun test'
});
console.log('ok');
await testMailgunAccount.sendSmartMail(emptyBodySmartmail, 'Sandbox Team <sandbox@mail.git.zone>');
console.log('hey');
});
tap.test('should retrieve a mail using a retrieval url', async () => {