-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update custom habit implementation change #6520
Conversation
@@ -944,6 +905,8 @@ void updateCustomHabitWithOneParameterToUpdateTest() throws IOException { | |||
assertEquals(customHabitDtoResponse, | |||
habitService.updateCustomHabit(customHabitDtoRequest, 1L, "[email protected]", image)); | |||
|
|||
verify(customShoppingListItemRepo, times(2)).findAllByUserIdAndHabitId(2L, 1L); | |||
// verify(customShoppingListItemRepo).save(any()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove it if it is unused
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is used, I have forgotten to uncomment it, already did.
} | ||
|
||
private void updateHabitTranslationsForCustomHabit(CustomHabitDtoRequest habitDto, Habit habit) { | ||
HabitTranslationDto habitTranslationDto = habitDto.getHabitTranslations().get(0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we have indexoutofboundexception
here?
please use findFirst
Kudos, SonarCloud Quality Gate passed! 0 Bugs 100.0% Coverage The version of Java (11.0.20) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17. |
GreenCity PR
Add ability to edit custom habits which user has created #6214
Summary Of Changes 🔥
Changed update of collections (HabitTranslations and CustomShoppingListItem).
for CustomShoppingListItem now: