Skip to content

Commit

Permalink
fixup! feat: Adding human readable 403 error access restricted
Browse files Browse the repository at this point in the history
  • Loading branch information
farhaanbukhsh committed Dec 15, 2024
1 parent cab6163 commit c462755
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/course-outline/page-alerts/PageAlerts.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -229,4 +229,14 @@ describe('<PageAlerts />', () => {
expect(queryByText(messages.forbiddenAlert.defaultMessage)).toBeInTheDocument();
expect(queryByText(messages.forbiddenAlertBody.defaultMessage)).toBeInTheDocument();
});

it('renders api error alerts when status is not 403', async () => {

Check failure on line 233 in src/course-outline/page-alerts/PageAlerts.test.jsx

View workflow job for this annotation

GitHub Actions / tests

Expected indentation of 2 spaces but found 0
const { queryByText } = renderComponent({
...pageAlertsData,
errors: {
outlineIndexApi: { data: 'some error', status: 500, type: API_ERROR_TYPES.serverError },
},
});
expect(queryByText('some error')).toBeInTheDocument();
});
});

0 comments on commit c462755

Please sign in to comment.