Skip to content

Commit

Permalink
fix backend unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kcinay055679 committed Jan 24, 2025
1 parent 22e3885 commit 5e27696
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
package ch.puzzle.okr.service.business;

import static ch.puzzle.okr.test.TestHelper.FTE_UNIT;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.*;

import ch.puzzle.okr.service.persistence.UnitPersistenceService;
import ch.puzzle.okr.service.validation.UnitValidationService;
Expand Down Expand Up @@ -66,6 +65,7 @@ void shouldCallCreateEntityMethodOnPersistenceService() {
@DisplayName("Should get alignment selection by quarter id and all teams except ignored team")
@Test
void shouldCallUpdateMethodOnPersistenceService() {
when(unitPersistenceService.findById(1L)).thenReturn(FTE_UNIT);
Long id = 1L;
unitBusinessService.updateEntity(id, FTE_UNIT);
verify(unitPersistenceService, times(1)).save(FTE_UNIT);
Expand Down

0 comments on commit 5e27696

Please sign in to comment.