Skip to content

Commit

Permalink
fix: favourite act testing
Browse files Browse the repository at this point in the history
  • Loading branch information
Xiao Peng authored and Xiao Peng committed Jan 7, 2025
1 parent 97d998d commit 304c4b0
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ void createUserActivityTest() {
entity.setHighlighted(Boolean.FALSE);
when(favouriteActivityRepository.save(any())).thenReturn(entity);

FavouriteActivityCreateDto createDto = new FavouriteActivityCreateDto("CREATE_A_CLASS_SEEDLOT");
FavouriteActivityCreateDto createDto = new FavouriteActivityCreateDto("CREATE_A_CLASS_SEEDLOT", false);
FavouriteActivityEntity entitySaved = favouriteActivityService.createUserActivity(createDto);

Assertions.assertNotNull(entitySaved);
Expand All @@ -67,7 +67,7 @@ void createUserActivityExceptionTest() {
entity.setHighlighted(Boolean.FALSE);
when(favouriteActivityRepository.save(any())).thenReturn(entity);

FavouriteActivityCreateDto createDto = new FavouriteActivityCreateDto(null);
FavouriteActivityCreateDto createDto = new FavouriteActivityCreateDto(null, false);

Exception notFoundExc =
Assertions.assertThrows(
Expand All @@ -81,7 +81,7 @@ void createUserActivityExceptionTest() {
when(favouriteActivityRepository.findAllByUserId(any())).thenReturn(userFavList);

FavouriteActivityCreateDto createAnotherDto =
new FavouriteActivityCreateDto("CREATE_A_CLASS_SEEDLOT");
new FavouriteActivityCreateDto("CREATE_A_CLASS_SEEDLOT", false);

Exception activityExists =
Assertions.assertThrows(
Expand Down

0 comments on commit 304c4b0

Please sign in to comment.