Conversation
| assert.equal(mailer[key], expected, `${key} was correct`) | ||
| }) | ||
| }) | ||
| }) |
Contributor
This is good. But could you change the default value of sesConfigurationSet to be the empty string '', and add assert.ok('sesConfigurationSet' in mailer, 'configuration key exists') at
| 'If sesConfigurationSet is not defined, then outgoing email does not contain X-SES* headers, for type ' + type, | |
| function () { | |
| mailer.mailer.sendMail = function (emailConfig) { | |
| var sesConfigurationSetHeader = emailConfig.headers['X-SES-CONFIGURATION-SET'] | |
| assert.ok(! sesConfigurationSetHeader) | |
| var sesMessageTags = emailConfig.headers['X-SES-MESSAGE-TAGS'] | |
| assert.ok(! sesMessageTags) | |
| } | |
| mailer[type](message) // invoke | |
| } | |
| ) | |
| it( | |
| 'If sesConfigurationSet is defined, then outgoing email will contain X-SES* headers, for type ' + type, | |
| function () { | |
| var savedSesConfigurationSet = mailer.sesConfigurationSet |
. Maybe also assert same in the test above that?