mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 10:31:15 +00:00
feat(SendGrid Node): Add option to specify "reply to" email addresses (#14282)
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
/* eslint-disable n8n-nodes-base/node-param-display-name-miscased */
|
||||
import nock from 'nock';
|
||||
|
||||
import { testWorkflows } from '@test/nodes/Helpers';
|
||||
|
||||
describe('Test SendGrid Node', () => {
|
||||
beforeAll(() => {
|
||||
nock.disableNetConnect();
|
||||
});
|
||||
|
||||
describe('Mail', () => {
|
||||
const sendgridNock = nock('https://api.sendgrid.com/v3');
|
||||
|
||||
beforeAll(() => {
|
||||
sendgridNock
|
||||
.post(
|
||||
'/mail/send',
|
||||
(body: { reply_to_list?: [{ email: string }] }) =>
|
||||
body?.reply_to_list?.[0]?.email === 'test-reply-to@n8n.io',
|
||||
)
|
||||
.reply(202);
|
||||
});
|
||||
|
||||
testWorkflows(['nodes/SendGrid/test/mail.workflow.json']);
|
||||
|
||||
it('should make the correct network calls', () => {
|
||||
sendgridNock.done();
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user