Merge pull request #1075 from mozilla/update-breach-alert-subject

Add and use new string for the subject of breach alert emails.
This commit is contained in:
luke crouch 2019-06-06 10:15:24 -05:00 коммит произвёл GitHub
Родитель 52f0e9193d 07eea8b882
Коммит c051cdf67a
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
4 изменённых файлов: 3 добавлений и 5 удалений

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

@ -27,7 +27,7 @@ function getEmailMockUps(req, res) {
emailSubject = req.fluentFormat("user-verify-email-report-subject");
if(emailType === "breachAlert") {
breachAlert = unsafeBreachesForEmail[0];
emailSubject = req.fluentFormat("hibp-notify-email-subject");
emailSubject = req.fluentFormat("breach-alert-subject");
}
} else if (emailType === "multipleBreaches") {
const breachArray = ["Experian", "Dropbox", "Apollo"];

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

@ -90,7 +90,7 @@ async function notify (req, res) {
{defaultLocale: "en"}
);
const subject = LocaleUtils.fluentFormat(supportedLocales, "hibp-notify-email-subject");
const subject = LocaleUtils.fluentFormat(supportedLocales, "breach-alert-subject");
const template = "default_email";
if (!notifiedRecipients.includes(breachedEmail)) {
await EmailUtils.sendEmail(

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

@ -31,8 +31,6 @@ error-hibp-connect = Error connecting to {-brand-HIBP}.
error-hibp-load-breaches = Could not load breaches.
error-must-be-signed-in = You must be signed in to your {-brand-fxa}.
hibp-notify-email-subject = {-product-name} Alert: Your account was involved in a breach.
home-title = {-product-name}
home-not-found = Page not found.

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

@ -59,7 +59,7 @@ async function checkNotifyCallsEverythingItShould(breachedEmail, recipientEmail)
expect (mockFluentFormatCalls.length).toBe(1);
const mockFluentFormatCallArgs = mockFluentFormatCalls[0];
expect (mockFluentFormatCallArgs[0]).toEqual(["en"]);
expect (mockFluentFormatCallArgs[1]).toBe("hibp-notify-email-subject");
expect (mockFluentFormatCallArgs[1]).toBe("breach-alert-subject");
const mockSendEmailCalls = EmailUtils.sendEmail.mock.calls;
expect (mockSendEmailCalls.length).toBe(1);