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 27, 2024
1 parent 7ded665 commit e8b4894
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/course-outline/page-alerts/PageAlerts.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,9 @@ describe('<PageAlerts />', () => {
const { queryByText } = renderComponent({
...pageAlertsData,
errors: {
outlineIndexApi: { data: 'some error', status: 403, type: API_ERROR_TYPES.serverError, dismissable: true },
outlineIndexApi: {
data: 'some error', status: 403, type: API_ERROR_TYPES.serverError, dismissable: true,
},
},
});
expect(queryByText(messages.forbiddenAlert.defaultMessage)).toBeInTheDocument();
Expand All @@ -234,7 +236,9 @@ describe('<PageAlerts />', () => {
const { queryByText } = renderComponent({
...pageAlertsData,
errors: {
outlineIndexApi: { data: 'some error', status: 500, type: API_ERROR_TYPES.serverError, dismissable: true },
outlineIndexApi: {
data: 'some error', status: 500, type: API_ERROR_TYPES.serverError, dismissable: true,
},
},
});
expect(queryByText('some error')).toBeInTheDocument();
Expand Down

0 comments on commit e8b4894

Please sign in to comment.