xsshunter/notification.test.js
Dustin Decker b1b48104e1
Send emails with sendgrid (#14)
* Use sendgrid to send emails

* add unsubscribe list

* fix test code

* update enabled var and readme

* email template

---------

Co-authored-by: counter <counter@counters-MacBook-Air.local>
2023-01-29 11:46:28 -08:00

24 lines
No EOL
724 B
JavaScript

const notification = require('./notification');
test('send an email notification', async () => {
const email = "dustin@trufflesec.com"
var payload_fire_data = {
id: 1,
user_id: 2,
url: "http://google.com",
ip_address: "127.0.0.1",
referer: "http://google.com",
user_agent: "TruffleHog",
cookies: [],
title: "Hello",
secrets: {},
origin: "http://google.com",
screenshot_id: 1,
was_iframe: true,
browser_timestamp: 1,
correlated_request: 'No correlated request found for this injection.',
}
await expect(notification.send_email_notification(payload_fire_data, email)).resolves.toBe(true);
});