Add sessionHolding template, unique 8-digit codes, reason slot for sessionCancelled, and disable unused notifications
This commit is contained in:
@@ -76,4 +76,20 @@ describe('SMS template variables', () => {
|
||||
assert.ok(slots.includes('username'));
|
||||
assert.ok(slots.includes('password'));
|
||||
});
|
||||
|
||||
it('exposes reason slot on the sessionCancelled template', () => {
|
||||
const def = SMS_TEMPLATE_DEFS.find((item) => item.key === 'sessionCancelled');
|
||||
const slots = (def?.slots || []).map((slot) => slot.key);
|
||||
assert.ok(slots.includes('reason'));
|
||||
});
|
||||
|
||||
it('defines the sessionHolding template with all expected slots', () => {
|
||||
const def = SMS_TEMPLATE_DEFS.find((item) => item.key === 'sessionHolding');
|
||||
assert.ok(def, 'sessionHolding template definition missing');
|
||||
const slots = (def.slots || []).map((slot) => slot.key);
|
||||
const expected = ['fullName', 'topic', 'className', 'sessionDate', 'classTime'];
|
||||
for (const slot of expected) {
|
||||
assert.ok(slots.includes(slot), `sessionHolding is missing slot ${slot}`);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user