backend-manager 5.0.91 → 5.0.93
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -2
- package/CLAUDE.md +14 -6
- package/README.md +6 -6
- package/TODO-MARKETING.md +3 -0
- package/TODO-PAYMENT-v2.md +71 -0
- package/TODO.md +7 -0
- package/package.json +3 -3
- package/src/cli/commands/{emulators.js → emulator.js} +15 -15
- package/src/cli/commands/index.js +1 -1
- package/src/cli/commands/setup-tests/{emulators-config.js → emulator-config.js} +4 -4
- package/src/cli/commands/setup-tests/index.js +2 -2
- package/src/cli/commands/setup-tests/project-id-consistency.js +1 -1
- package/src/cli/commands/test.js +16 -16
- package/src/cli/index.js +4 -4
- package/src/manager/events/auth/on-create.js +5 -158
- package/src/manager/events/firestore/payments-webhooks/analytics.js +4 -3
- package/src/manager/events/firestore/payments-webhooks/on-write.js +56 -6
- package/src/manager/events/firestore/payments-webhooks/transitions/one-time/purchase-completed.js +3 -3
- package/src/manager/events/firestore/payments-webhooks/transitions/one-time/purchase-failed.js +1 -1
- package/src/manager/events/firestore/payments-webhooks/transitions/send-email.js +32 -28
- package/src/manager/events/firestore/payments-webhooks/transitions/subscription/cancellation-requested.js +3 -3
- package/src/manager/events/firestore/payments-webhooks/transitions/subscription/new-subscription.js +3 -3
- package/src/manager/events/firestore/payments-webhooks/transitions/subscription/payment-failed.js +3 -3
- package/src/manager/events/firestore/payments-webhooks/transitions/subscription/payment-recovered.js +3 -3
- package/src/manager/events/firestore/payments-webhooks/transitions/subscription/plan-changed.js +3 -3
- package/src/manager/events/firestore/payments-webhooks/transitions/subscription/subscription-cancelled.js +3 -3
- package/src/manager/functions/core/actions/api/admin/send-email.js +0 -131
- package/src/manager/functions/core/actions/api/general/add-marketing-contact.js +2 -137
- package/src/manager/functions/core/actions/api/general/emails/general:download-app-link.js +2 -2
- package/src/manager/functions/core/actions/api/user/sign-up.js +1 -1
- package/src/manager/index.js +12 -0
- package/src/manager/libraries/email.js +523 -0
- package/src/manager/libraries/infer-contact.js +140 -0
- package/src/manager/libraries/prompts/infer-contact.md +43 -0
- package/src/manager/routes/admin/backup/post.js +4 -3
- package/src/manager/routes/admin/email/post.js +11 -428
- package/src/manager/routes/admin/hook/post.js +3 -2
- package/src/manager/routes/admin/notification/post.js +14 -12
- package/src/manager/routes/admin/post/post.js +5 -6
- package/src/manager/routes/admin/post/put.js +3 -2
- package/src/manager/routes/admin/stats/get.js +19 -10
- package/src/manager/routes/general/email/post.js +8 -21
- package/src/manager/routes/general/email/templates/download-app-link.js +2 -2
- package/src/manager/routes/marketing/contact/post.js +2 -100
- package/src/manager/routes/payments/intent/post.js +0 -2
- package/src/manager/routes/payments/intent/processors/test.js +9 -10
- package/src/manager/routes/user/oauth2/_helpers.js +3 -2
- package/src/manager/routes/user/oauth2/delete.js +3 -3
- package/src/manager/routes/user/oauth2/get.js +2 -2
- package/src/manager/routes/user/oauth2/post.js +9 -9
- package/src/manager/routes/user/sessions/delete.js +4 -3
- package/src/manager/routes/user/signup/post.js +254 -54
- package/src/manager/schemas/admin/email/post.js +13 -8
- package/src/test/run-tests.js +1 -1
- package/test/functions/admin/send-email.js +1 -88
- package/test/helpers/email.js +421 -0
- package/test/helpers/infer-contact.js +299 -0
- package/test/routes/admin/email.js +41 -90
- package/REFACTOR-BEM-API.md +0 -76
- package/REFACTOR-MIDDLEWARE.md +0 -62
- package/REFACTOR-PAYMENT.md +0 -66
|
@@ -0,0 +1,421 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Test: Email library (libraries/email.js)
|
|
3
|
+
* Library-level tests: validation edge cases, recipient formats, deduplication, features
|
|
4
|
+
*
|
|
5
|
+
* These tests exercise the email library through the admin/email route to get a real
|
|
6
|
+
* SendGrid integration. Route-level tests (auth, permissions) are in test/routes/admin/email.js.
|
|
7
|
+
*/
|
|
8
|
+
module.exports = {
|
|
9
|
+
description: 'Email library',
|
|
10
|
+
type: 'group',
|
|
11
|
+
skip: !process.env.TEST_EXTENDED_MODE ? 'TEST_EXTENDED_MODE env var not set (skipping email tests)' : false,
|
|
12
|
+
tests: [
|
|
13
|
+
// --- Validation / Rejection ---
|
|
14
|
+
|
|
15
|
+
{
|
|
16
|
+
name: 'empty-to-array-rejected',
|
|
17
|
+
auth: 'admin',
|
|
18
|
+
timeout: 15000,
|
|
19
|
+
|
|
20
|
+
async run({ http, assert }) {
|
|
21
|
+
const response = await http.post('admin/email', {
|
|
22
|
+
subject: 'BEM Test Email - Empty To',
|
|
23
|
+
to: [],
|
|
24
|
+
copy: false,
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
assert.isError(response, 400, 'Empty to array should return 400');
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
|
|
31
|
+
{
|
|
32
|
+
name: 'object-recipient-without-email-rejected',
|
|
33
|
+
auth: 'admin',
|
|
34
|
+
timeout: 15000,
|
|
35
|
+
|
|
36
|
+
async run({ http, assert }) {
|
|
37
|
+
const response = await http.post('admin/email', {
|
|
38
|
+
subject: 'BEM Test Email - Bad Object',
|
|
39
|
+
to: [{ name: 'No Email' }],
|
|
40
|
+
copy: false,
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
assert.isError(response, 400, 'Object without email should return 400');
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
|
|
47
|
+
{
|
|
48
|
+
name: 'default-template-used-when-omitted',
|
|
49
|
+
auth: 'admin',
|
|
50
|
+
timeout: 30000,
|
|
51
|
+
|
|
52
|
+
async run({ http, assert, config }) {
|
|
53
|
+
const response = await http.post('admin/email', {
|
|
54
|
+
subject: 'BEM Test Email - Default Template',
|
|
55
|
+
to: [{ email: `_test-receiver@${config.domain}` }],
|
|
56
|
+
copy: false,
|
|
57
|
+
data: {
|
|
58
|
+
email: {
|
|
59
|
+
subject: 'BEM Test Email - Default Template',
|
|
60
|
+
body: 'Testing that default template is used when not specified.',
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
assert.isSuccess(response, 'Should succeed with default template');
|
|
66
|
+
assert.equal(response.data.status, 'sent', 'Status should be sent');
|
|
67
|
+
assert.equal(response.data.options.templateId, 'd-b7f8da3c98ad49a2ad1e187f3a67b546', 'Should use default template');
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
|
|
71
|
+
{
|
|
72
|
+
name: 'nonexistent-uid-rejected',
|
|
73
|
+
auth: 'admin',
|
|
74
|
+
timeout: 15000,
|
|
75
|
+
|
|
76
|
+
async run({ http, assert }) {
|
|
77
|
+
const response = await http.post('admin/email', {
|
|
78
|
+
subject: 'BEM Test Email - Bad UID',
|
|
79
|
+
to: 'uid:nonexistent_uid_12345',
|
|
80
|
+
copy: false,
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
assert.isError(response, 400, 'Nonexistent UID should return 400');
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
|
|
87
|
+
// --- Subject Fallback ---
|
|
88
|
+
|
|
89
|
+
{
|
|
90
|
+
name: 'subject-from-data-fallback',
|
|
91
|
+
auth: 'admin',
|
|
92
|
+
timeout: 30000,
|
|
93
|
+
|
|
94
|
+
async run({ http, assert, config }) {
|
|
95
|
+
const response = await http.post('admin/email', {
|
|
96
|
+
to: [{ email: `_test-receiver@${config.domain}` }],
|
|
97
|
+
copy: false,
|
|
98
|
+
data: {
|
|
99
|
+
email: {
|
|
100
|
+
subject: 'BEM Test Email - Fallback Subject',
|
|
101
|
+
body: 'Testing subject fallback from data.email.subject.',
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
assert.isSuccess(response, 'Should use subject from data.email.subject');
|
|
107
|
+
assert.equal(response.data.status, 'sent', 'Status should be sent');
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
|
|
111
|
+
// --- Recipient Formats ---
|
|
112
|
+
|
|
113
|
+
{
|
|
114
|
+
name: 'string-email-recipient',
|
|
115
|
+
auth: 'admin',
|
|
116
|
+
timeout: 30000,
|
|
117
|
+
|
|
118
|
+
async run({ http, assert, config }) {
|
|
119
|
+
const response = await http.post('admin/email', {
|
|
120
|
+
subject: 'BEM Test Email - String Email',
|
|
121
|
+
to: `_test-receiver@${config.domain}`,
|
|
122
|
+
copy: false,
|
|
123
|
+
data: {
|
|
124
|
+
email: {
|
|
125
|
+
subject: 'BEM Test Email - String Email',
|
|
126
|
+
body: 'Testing string email format.',
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
assert.isSuccess(response, 'Should send email to string address');
|
|
132
|
+
assert.equal(response.data.status, 'sent', 'Status should be sent');
|
|
133
|
+
},
|
|
134
|
+
},
|
|
135
|
+
|
|
136
|
+
{
|
|
137
|
+
name: 'uid-recipient',
|
|
138
|
+
auth: 'admin',
|
|
139
|
+
timeout: 30000,
|
|
140
|
+
|
|
141
|
+
async run({ http, assert, accounts }) {
|
|
142
|
+
const response = await http.post('admin/email', {
|
|
143
|
+
subject: 'BEM Test Email - UID Recipient',
|
|
144
|
+
to: `uid:${accounts.admin.uid}`,
|
|
145
|
+
copy: false,
|
|
146
|
+
data: {
|
|
147
|
+
email: {
|
|
148
|
+
subject: 'BEM Test Email - UID Recipient',
|
|
149
|
+
body: 'Testing UID resolution.',
|
|
150
|
+
},
|
|
151
|
+
},
|
|
152
|
+
});
|
|
153
|
+
|
|
154
|
+
assert.isSuccess(response, 'Should send email to UID');
|
|
155
|
+
assert.equal(response.data.status, 'sent', 'Status should be sent');
|
|
156
|
+
},
|
|
157
|
+
},
|
|
158
|
+
|
|
159
|
+
{
|
|
160
|
+
name: 'mixed-recipients',
|
|
161
|
+
auth: 'admin',
|
|
162
|
+
timeout: 30000,
|
|
163
|
+
|
|
164
|
+
async run({ http, assert, accounts, config }) {
|
|
165
|
+
const response = await http.post('admin/email', {
|
|
166
|
+
subject: 'BEM Test Email - Mixed Recipients',
|
|
167
|
+
to: [
|
|
168
|
+
`_test-receiver@${config.domain}`,
|
|
169
|
+
{ email: `_test-receiver-2@${config.domain}`, name: 'Receiver 2' },
|
|
170
|
+
`uid:${accounts.admin.uid}`,
|
|
171
|
+
],
|
|
172
|
+
copy: false,
|
|
173
|
+
data: {
|
|
174
|
+
email: {
|
|
175
|
+
subject: 'BEM Test Email - Mixed Recipients',
|
|
176
|
+
body: 'Testing mixed recipient formats.',
|
|
177
|
+
},
|
|
178
|
+
},
|
|
179
|
+
});
|
|
180
|
+
|
|
181
|
+
assert.isSuccess(response, 'Should send email to mixed recipients');
|
|
182
|
+
assert.equal(response.data.status, 'sent', 'Status should be sent');
|
|
183
|
+
},
|
|
184
|
+
},
|
|
185
|
+
|
|
186
|
+
{
|
|
187
|
+
name: 'object-recipient-with-name',
|
|
188
|
+
auth: 'admin',
|
|
189
|
+
timeout: 30000,
|
|
190
|
+
|
|
191
|
+
async run({ http, assert, config }) {
|
|
192
|
+
const response = await http.post('admin/email', {
|
|
193
|
+
subject: 'BEM Test Email - Object Recipient',
|
|
194
|
+
to: { email: `_test-receiver@${config.domain}`, name: 'Named Recipient' },
|
|
195
|
+
copy: false,
|
|
196
|
+
data: {
|
|
197
|
+
email: {
|
|
198
|
+
subject: 'BEM Test Email - Object Recipient',
|
|
199
|
+
body: 'Testing single object recipient with name.',
|
|
200
|
+
},
|
|
201
|
+
},
|
|
202
|
+
});
|
|
203
|
+
|
|
204
|
+
assert.isSuccess(response, 'Should send email to object recipient');
|
|
205
|
+
assert.equal(response.data.status, 'sent', 'Status should be sent');
|
|
206
|
+
},
|
|
207
|
+
},
|
|
208
|
+
|
|
209
|
+
{
|
|
210
|
+
name: 'cc-bcc-recipients-accepted',
|
|
211
|
+
auth: 'admin',
|
|
212
|
+
timeout: 30000,
|
|
213
|
+
|
|
214
|
+
async run({ http, assert, config }) {
|
|
215
|
+
const response = await http.post('admin/email', {
|
|
216
|
+
subject: 'BEM Test Email - CC/BCC',
|
|
217
|
+
to: `_test-receiver@${config.domain}`,
|
|
218
|
+
cc: `_test-cc@${config.domain}`,
|
|
219
|
+
bcc: { email: `_test-bcc@${config.domain}`, name: 'BCC Receiver' },
|
|
220
|
+
copy: false,
|
|
221
|
+
data: {
|
|
222
|
+
email: {
|
|
223
|
+
subject: 'BEM Test Email - CC/BCC',
|
|
224
|
+
body: 'Testing cc and bcc recipients.',
|
|
225
|
+
},
|
|
226
|
+
},
|
|
227
|
+
});
|
|
228
|
+
|
|
229
|
+
assert.isSuccess(response, 'Should send email with cc and bcc');
|
|
230
|
+
assert.equal(response.data.status, 'sent', 'Status should be sent');
|
|
231
|
+
},
|
|
232
|
+
},
|
|
233
|
+
|
|
234
|
+
// --- Deduplication ---
|
|
235
|
+
|
|
236
|
+
{
|
|
237
|
+
name: 'dedup-same-email-in-to',
|
|
238
|
+
auth: 'admin',
|
|
239
|
+
timeout: 30000,
|
|
240
|
+
|
|
241
|
+
async run({ http, assert, config }) {
|
|
242
|
+
const email = `_test-dedup@${config.domain}`;
|
|
243
|
+
|
|
244
|
+
const response = await http.post('admin/email', {
|
|
245
|
+
subject: 'BEM Test Email - Dedup To',
|
|
246
|
+
to: [email, email],
|
|
247
|
+
copy: false,
|
|
248
|
+
data: {
|
|
249
|
+
email: {
|
|
250
|
+
subject: 'BEM Test Email - Dedup To',
|
|
251
|
+
body: 'Testing deduplication of same email in to.',
|
|
252
|
+
},
|
|
253
|
+
},
|
|
254
|
+
});
|
|
255
|
+
|
|
256
|
+
assert.isSuccess(response, 'Should send despite duplicate to');
|
|
257
|
+
assert.equal(response.data.status, 'sent', 'Status should be sent');
|
|
258
|
+
assert.equal(response.data.options.to.length, 1, 'Duplicate should be removed from to');
|
|
259
|
+
},
|
|
260
|
+
},
|
|
261
|
+
|
|
262
|
+
{
|
|
263
|
+
name: 'dedup-to-removes-from-cc',
|
|
264
|
+
auth: 'admin',
|
|
265
|
+
timeout: 30000,
|
|
266
|
+
|
|
267
|
+
async run({ http, assert, config }) {
|
|
268
|
+
const email = `_test-dedup-cc@${config.domain}`;
|
|
269
|
+
|
|
270
|
+
const response = await http.post('admin/email', {
|
|
271
|
+
subject: 'BEM Test Email - Dedup CC',
|
|
272
|
+
to: email,
|
|
273
|
+
cc: email,
|
|
274
|
+
copy: false,
|
|
275
|
+
data: {
|
|
276
|
+
email: {
|
|
277
|
+
subject: 'BEM Test Email - Dedup CC',
|
|
278
|
+
body: 'Testing cross-list dedup (to removes from cc).',
|
|
279
|
+
},
|
|
280
|
+
},
|
|
281
|
+
});
|
|
282
|
+
|
|
283
|
+
assert.isSuccess(response, 'Should send despite duplicate in cc');
|
|
284
|
+
assert.equal(response.data.status, 'sent', 'Status should be sent');
|
|
285
|
+
assert.equal(response.data.options.cc.length, 0, 'Email in to should be removed from cc');
|
|
286
|
+
},
|
|
287
|
+
},
|
|
288
|
+
|
|
289
|
+
{
|
|
290
|
+
name: 'dedup-case-insensitive',
|
|
291
|
+
auth: 'admin',
|
|
292
|
+
timeout: 30000,
|
|
293
|
+
|
|
294
|
+
async run({ http, assert, config }) {
|
|
295
|
+
const response = await http.post('admin/email', {
|
|
296
|
+
subject: 'BEM Test Email - Case Dedup',
|
|
297
|
+
to: [`_TEST-DEDUP@${config.domain}`, `_test-dedup@${config.domain}`],
|
|
298
|
+
copy: false,
|
|
299
|
+
data: {
|
|
300
|
+
email: {
|
|
301
|
+
subject: 'BEM Test Email - Case Dedup',
|
|
302
|
+
body: 'Testing case-insensitive deduplication.',
|
|
303
|
+
},
|
|
304
|
+
},
|
|
305
|
+
});
|
|
306
|
+
|
|
307
|
+
assert.isSuccess(response, 'Should send despite case-different duplicates');
|
|
308
|
+
assert.equal(response.data.status, 'sent', 'Status should be sent');
|
|
309
|
+
assert.equal(response.data.options.to.length, 1, 'Case-insensitive duplicate should be removed');
|
|
310
|
+
},
|
|
311
|
+
},
|
|
312
|
+
|
|
313
|
+
// --- Features ---
|
|
314
|
+
|
|
315
|
+
{
|
|
316
|
+
name: 'copy-false-no-carbon-copies',
|
|
317
|
+
auth: 'admin',
|
|
318
|
+
timeout: 30000,
|
|
319
|
+
|
|
320
|
+
async run({ http, assert, config }) {
|
|
321
|
+
const response = await http.post('admin/email', {
|
|
322
|
+
subject: 'BEM Test Email - No Copy',
|
|
323
|
+
to: `_test-receiver@${config.domain}`,
|
|
324
|
+
copy: false,
|
|
325
|
+
data: {
|
|
326
|
+
email: {
|
|
327
|
+
subject: 'BEM Test Email - No Copy',
|
|
328
|
+
body: 'Testing that copy:false produces no cc/bcc.',
|
|
329
|
+
},
|
|
330
|
+
},
|
|
331
|
+
});
|
|
332
|
+
|
|
333
|
+
assert.isSuccess(response, 'Should send email without carbon copies');
|
|
334
|
+
assert.equal(response.data.status, 'sent', 'Status should be sent');
|
|
335
|
+
assert.equal(response.data.options.cc.length, 0, 'cc should be empty with copy:false');
|
|
336
|
+
assert.equal(response.data.options.bcc.length, 0, 'bcc should be empty with copy:false');
|
|
337
|
+
},
|
|
338
|
+
},
|
|
339
|
+
|
|
340
|
+
{
|
|
341
|
+
name: 'html-override-replaces-template',
|
|
342
|
+
auth: 'admin',
|
|
343
|
+
timeout: 30000,
|
|
344
|
+
|
|
345
|
+
async run({ http, assert, config }) {
|
|
346
|
+
const response = await http.post('admin/email', {
|
|
347
|
+
subject: 'BEM Test Email - HTML Override',
|
|
348
|
+
to: `_test-receiver@${config.domain}`,
|
|
349
|
+
html: '<p>This is raw HTML content.</p>',
|
|
350
|
+
copy: false,
|
|
351
|
+
});
|
|
352
|
+
|
|
353
|
+
assert.isSuccess(response, 'Should send email with HTML override');
|
|
354
|
+
assert.equal(response.data.status, 'sent', 'Status should be sent');
|
|
355
|
+
assert.ok(response.data.options.content, 'Should have content array for HTML override');
|
|
356
|
+
assert.equal(response.data.options.templateId, undefined, 'templateId should be removed for HTML override');
|
|
357
|
+
},
|
|
358
|
+
},
|
|
359
|
+
|
|
360
|
+
{
|
|
361
|
+
name: 'svg-images-converted-to-png',
|
|
362
|
+
auth: 'admin',
|
|
363
|
+
timeout: 30000,
|
|
364
|
+
|
|
365
|
+
async run({ http, assert, config }) {
|
|
366
|
+
const response = await http.post('admin/email', {
|
|
367
|
+
subject: 'BEM Test Email - SVG to PNG',
|
|
368
|
+
to: `_test-receiver@${config.domain}`,
|
|
369
|
+
copy: false,
|
|
370
|
+
data: {
|
|
371
|
+
email: {
|
|
372
|
+
subject: 'BEM Test Email - SVG to PNG',
|
|
373
|
+
body: 'Testing that SVG images are converted to PNG for email.',
|
|
374
|
+
},
|
|
375
|
+
},
|
|
376
|
+
});
|
|
377
|
+
|
|
378
|
+
assert.isSuccess(response, 'Should send email');
|
|
379
|
+
assert.equal(response.data.status, 'sent', 'Status should be sent');
|
|
380
|
+
|
|
381
|
+
const appImages = response.data.options.dynamicTemplateData.app.images;
|
|
382
|
+
|
|
383
|
+
// Any image that was an SVG should now be a PNG (-x.svg → -1024.png)
|
|
384
|
+
for (const [key, value] of Object.entries(appImages)) {
|
|
385
|
+
assert.ok(
|
|
386
|
+
!String(value || '').endsWith('.svg'),
|
|
387
|
+
`app.images.${key} should not be an SVG (got: ${value})`,
|
|
388
|
+
);
|
|
389
|
+
}
|
|
390
|
+
},
|
|
391
|
+
},
|
|
392
|
+
|
|
393
|
+
{
|
|
394
|
+
name: 'sendat-iso-string-accepted',
|
|
395
|
+
auth: 'admin',
|
|
396
|
+
timeout: 30000,
|
|
397
|
+
|
|
398
|
+
async run({ http, assert, config }) {
|
|
399
|
+
// Use a time 1 hour from now (well within the 71h limit)
|
|
400
|
+
const sendAtDate = new Date(Date.now() + (60 * 60 * 1000)).toISOString();
|
|
401
|
+
|
|
402
|
+
const response = await http.post('admin/email', {
|
|
403
|
+
subject: 'BEM Test Email - ISO SendAt',
|
|
404
|
+
to: `_test-receiver@${config.domain}`,
|
|
405
|
+
sendAt: sendAtDate,
|
|
406
|
+
copy: false,
|
|
407
|
+
data: {
|
|
408
|
+
email: {
|
|
409
|
+
subject: 'BEM Test Email - ISO SendAt',
|
|
410
|
+
body: 'Testing ISO string sendAt.',
|
|
411
|
+
},
|
|
412
|
+
},
|
|
413
|
+
});
|
|
414
|
+
|
|
415
|
+
assert.isSuccess(response, 'Should send email with ISO sendAt');
|
|
416
|
+
assert.equal(response.data.status, 'sent', 'Status should be sent (within 71h)');
|
|
417
|
+
assert.isType(response.data.options.sendAt, 'number', 'sendAt should be normalized to unix timestamp');
|
|
418
|
+
},
|
|
419
|
+
},
|
|
420
|
+
],
|
|
421
|
+
};
|