Skip to content

Commit

Permalink
refactor: fixing tests for Textbooks page
Browse files Browse the repository at this point in the history
  • Loading branch information
PKulkoRaccoonGang committed May 7, 2024
1 parent 13c5387 commit 10fdedd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/textbooks/data/thunk.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ describe('createTextbookQuery', () => {
expect(dispatch).toHaveBeenCalledWith(updateSavingStatus({ status: RequestStatus.IN_PROGRESS }));
expect(dispatch).toHaveBeenCalledWith(showProcessingNotification(NOTIFICATION_MESSAGES.saving));
expect(createTextbook).toHaveBeenCalledWith('courseId', {});
expect(dispatch).toHaveBeenCalledWith(updateSavingStatus({ status: RequestStatus.FAILED }));
expect(dispatch).toHaveBeenCalledWith(updateSavingStatus({ status: RequestStatus.FAILED, errorMessage: '' }));
expect(dispatch).toHaveBeenCalledWith(hideProcessingNotification());
});
});
Expand Down Expand Up @@ -106,7 +106,7 @@ describe('editTextbookQuery', () => {
expect(dispatch).toHaveBeenCalledWith(updateSavingStatus({ status: RequestStatus.IN_PROGRESS }));
expect(dispatch).toHaveBeenCalledWith(showProcessingNotification(NOTIFICATION_MESSAGES.saving));
expect(editTextbook).toHaveBeenCalledWith('courseId', {});
expect(dispatch).toHaveBeenCalledWith(updateSavingStatus({ status: RequestStatus.FAILED }));
expect(dispatch).toHaveBeenCalledWith(updateSavingStatus({ status: RequestStatus.FAILED, errorMessage: '' }));
expect(dispatch).toHaveBeenCalledWith(hideProcessingNotification());
});
});
Expand All @@ -133,7 +133,7 @@ describe('deleteTextbookQuery', () => {
expect(dispatch).toHaveBeenCalledWith(updateSavingStatus({ status: RequestStatus.IN_PROGRESS }));
expect(dispatch).toHaveBeenCalledWith(showProcessingNotification(NOTIFICATION_MESSAGES.deleting));
expect(deleteTextbook).toHaveBeenCalledWith('courseId', 'textbookId');
expect(dispatch).toHaveBeenCalledWith(updateSavingStatus({ status: RequestStatus.FAILED }));
expect(dispatch).toHaveBeenCalledWith(updateSavingStatus({ status: RequestStatus.FAILED, errorMessage: '' }));
expect(dispatch).toHaveBeenCalledWith(hideProcessingNotification());
});
});

0 comments on commit 10fdedd

Please sign in to comment.