Skip to content

Commit 367b34c

Browse files
committed
update test
1 parent 6c7107f commit 367b34c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

test/controllers/update/update.review.managing.officer.individual.spec.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,24 +108,27 @@ describe('Test review managing officer', () => {
108108
expect(resp.text).toContain(SERVICE_UNAVAILABLE);
109109
});
110110

111-
test(`render the ${config.UPDATE_REVIEW_INDIVIDUAL_MANAGING_OFFICER_PAGE} page`, async () => {
111+
test(`render the ${config.UPDATE_REVIEW_INDIVIDUAL_MANAGING_OFFICER_PAGE} page and verifies service and residential address`, async () => {
112112
mockGetApplicationData.mockReturnValueOnce({
113113
...APPLICATION_DATA_EMPTY_BO_MOCK,
114114
});
115115
mockMapDataObjectToFields.mockReturnValueOnce(SERVICE_ADDRESS_MOCK);
116+
mockMapDataObjectToFields.mockReturnValueOnce(RESIDENTIAL_ADDRESS_MOCK);
116117
const resp = await request(app).get(UPDATE_REVIEW_INDIVIDUAL_MANAGING_OFFICER_WITH_PARAM_URL_TEST);
117118
expect(resp.status).toEqual(200);
118119
expect(resp.text).toContain(config.UPDATE_BENEFICIAL_OWNER_BO_MO_REVIEW_URL);
119120
expect(resp.text).toContain("addressLine1");
121+
expect(resp.text).toContain("residential address addressLine1");
120122
});
121123

122-
test('service address not displayed when no address returned', async () => {
124+
test('service and residential address not displayed when no address returned', async () => {
123125
mockGetApplicationData.mockReturnValueOnce({
124126
...APPLICATION_DATA_EMPTY_BO_MOCK,
125127
});
126128
const resp = await request(app).get(UPDATE_REVIEW_INDIVIDUAL_MANAGING_OFFICER_WITH_PARAM_URL_TEST);
127129
expect(resp.status).toEqual(200);
128130
expect(resp.text).not.toContain("addressLine1");
131+
expect(resp.text).not.toContain("residential address addressLine1");
129132
});
130133
});
131134

0 commit comments

Comments
 (0)