diff --git a/src/course-outline/page-alerts/PageAlerts.test.jsx b/src/course-outline/page-alerts/PageAlerts.test.jsx index 6d646f7cb..9dab8aa91 100644 --- a/src/course-outline/page-alerts/PageAlerts.test.jsx +++ b/src/course-outline/page-alerts/PageAlerts.test.jsx @@ -218,4 +218,15 @@ describe('', () => { expect(queryByText('some error')).toBeInTheDocument(); expect(queryByText('some unknown error')).toBeInTheDocument(); }); + + it('renders forbidden api error alerts', async () => { + const { queryByText } = renderComponent({ + ...pageAlertsData, + errors: { + outlineIndexApi: { data: 'some error', status: 403, type: API_ERROR_TYPES.serverError }, + }, + }); + expect(queryByText(messages.forbiddenAlert.defaultMessage)).toBeInTheDocument(); + expect(queryByText(messages.forbiddenAlertBody.defaultMessage)).toBeInTheDocument(); + }); });