From 827957f0618951847c6928735d539da840945486 Mon Sep 17 00:00:00 2001 From: Jason Lin Date: Tue, 15 Aug 2023 16:05:29 -0400 Subject: [PATCH] Swap dev team email parameter store tests with help desk email. --- .../emailParameterStore.test.ts | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/services/app-api/src/parameterStore/emailParameterStore/emailParameterStore.test.ts b/services/app-api/src/parameterStore/emailParameterStore/emailParameterStore.test.ts index 3d26a2060e..f5c6130d2c 100644 --- a/services/app-api/src/parameterStore/emailParameterStore/emailParameterStore.test.ts +++ b/services/app-api/src/parameterStore/emailParameterStore/emailParameterStore.test.ts @@ -4,8 +4,8 @@ import { getOACTEmails, getCmsReviewHelpEmail, getCmsRateHelpEmail, - getCmsDevTeamHelpEmail, getDevReviewTeamEmails, + getHelpDeskEmail, } from './' import { ParameterStore } from '../awsParameterStore' @@ -177,20 +177,22 @@ describe('emailParameterStore', () => { }) }) - describe('getCmsDevTeamHelpEmail', () => { - it('returns dev team help email as string', async () => { + describe('getHelpDeskEmail', () => { + it('returns help desk email as string', async () => { const spy = jest.spyOn(ParameterStore, 'getParameter') spy.mockResolvedValue({ - value: `"MC-Review Support" `, + value: `"MC-Review Help Desk" `, type: 'String', }) - const result = await getCmsDevTeamHelpEmail() - expect(result).toBe(`"MC-Review Support" `) + const result = await getHelpDeskEmail() + expect(result).toBe( + `"MC-Review Help Desk" ` + ) }) it('returns error when fetching store value fails', async () => { const spy = jest.spyOn(ParameterStore, 'getParameter') spy.mockResolvedValue(new Error('No store found')) - const result = await getCmsDevTeamHelpEmail() + const result = await getHelpDeskEmail() expect(result).toBeInstanceOf(Error) }) it('returns error when Type of parameter store value is incompatible', async () => { @@ -199,10 +201,10 @@ describe('emailParameterStore', () => { value: '"CMS Source Email" ', type: 'StringList', }) - const result = await getCmsDevTeamHelpEmail() + const result = await getHelpDeskEmail() expect(result).toEqual( new Error( - 'Parameter store /configuration/email/devTeamHelpAddress value of Type StringList is not supported' + 'Parameter store /configuration/email/helpDeskAddress value of Type StringList is not supported' ) ) })