Skip to content

Commit

Permalink
add test for default bcc
Browse files Browse the repository at this point in the history
  • Loading branch information
kbarbounakis committed May 4, 2022
1 parent fa6e505 commit 244e26a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
12 changes: 12 additions & 0 deletions spec/MailHelper.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,16 @@ describe('MailHelper', () => {
).toBeResolved();
});

it('should send to configured bcc', async () => {
const context = app.createContext();
context.application.getConfiguration().getSourceAt('settings/mail/bcc', 'support1@example.com');
/**
* @type {MailHelper}
*/
const mailer = new MailHelper(context);
await expectAsync(
mailer.subject('New Text Message').text('Hello World!').to('user1@example.com').sendAsync()
).toBeResolved();
});

});
1 change: 1 addition & 0 deletions spec/TestApplication.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const testConfiguration = {
"secure": false,
"ignoreTLS": true,
"from": "Test Mail Services <mailer@example.com>",
"bcc": "support1@example.com"
}

class TestContext {
Expand Down
2 changes: 1 addition & 1 deletion spec/support/jasmine.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
],
"env": {
"stopSpecOnExpectationFailure": false,
"random": true
"random": false
}
}

0 comments on commit 244e26a

Please sign in to comment.