fix(email): make config.sesConfigurationSet default the empty string

https://github.com/mozilla/fxa-auth-server/pull/2525
r=philbooth
This commit is contained in:
John Morrison 2018-07-17 02:39:11 -07:00 коммит произвёл Phil Booth
Родитель d3fc1cbd2d
Коммит 35ac5f0d05
2 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -298,7 +298,7 @@ var conf = convict({
'X-SES-MESSAGE-TAGS headers will be added to emails. Only ' +
'intended for Production/Stage use.'),
format: String,
default: undefined,
default: '',
env: 'SES_CONFIGURATION_SET'
},
bounces: {

Просмотреть файл

@ -254,6 +254,7 @@ describe(
it(
'If sesConfigurationSet is not defined, then outgoing email does not contain X-SES* headers, for type ' + type,
function () {
assert.ok('sesConfigurationSet' in mailer, 'configuration key exists')
mailer.mailer.sendMail = function (emailConfig) {
var sesConfigurationSetHeader = emailConfig.headers['X-SES-CONFIGURATION-SET']
assert.ok(! sesConfigurationSetHeader)
@ -268,6 +269,7 @@ describe(
it(
'If sesConfigurationSet is defined, then outgoing email will contain X-SES* headers, for type ' + type,
function () {
assert.ok('sesConfigurationSet' in mailer, 'configuration key exists')
var savedSesConfigurationSet = mailer.sesConfigurationSet
mailer.sesConfigurationSet = 'some-defined-value'