Skip to content

Commit

Permalink
chore: address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
sergivalero20 committed Dec 12, 2024
1 parent 30ca6db commit ebe2edd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/features/Dashboard/data/_test_/redux.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ describe('Dashboard redux tests', () => {

test('successful fetch licenses data', async () => {
const licensesApiUrl = `${process.env.COURSE_OPERATIONS_API_V2_BASE_URL}/license-pool`
+ '/?limit=false&institution_id=1&page=1&';
+ '/?limit=false&institution_id=1';
const mockResponse = [
{
licenseName: 'License Name 1',
Expand Down
6 changes: 2 additions & 4 deletions src/features/Licenses/LicensesPage/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,8 @@ const LicensesPage = () => {
dispatch(fetchLicensesData(selectedInstitution?.id, currentPage, stateLicenses.filters));
}

return () => {
dispatch(resetLicensesTable());
};
}, [selectedInstitution, dispatch, currentPage]);
return () => dispatch(resetLicensesTable());
}, [selectedInstitution, dispatch, currentPage]); // eslint-disable-line react-hooks/exhaustive-deps

return (
<Container size="xl" className="px-4">
Expand Down
4 changes: 2 additions & 2 deletions src/features/Licenses/data/_test_/redux.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ describe('Licenses redux tests', () => {

test('successful fetch licenses data', async () => {
const licensesApiUrl = `${process.env.COURSE_OPERATIONS_API_V2_BASE_URL}/license-pool`
+ '/?limit=true&institution_id=1&page=1&';
+ '/?limit=true&institution_id=1';
const mockResponse = {
results: [
{
Expand Down Expand Up @@ -67,7 +67,7 @@ describe('Licenses redux tests', () => {

test('failed fetch licenses data', async () => {
const licensesApiUrl = `${process.env.COURSE_OPERATIONS_API_V2_BASE_URL}/license-pool`
+ '/?limit=false&institution_id=1&page=1&';
+ '/?limit=false&institution_id=1';
axiosMock.onGet(licensesApiUrl)
.reply(500);

Expand Down

0 comments on commit ebe2edd

Please sign in to comment.