Skip to content

Commit

Permalink
Add mock for brukerService in getTestgrupper test to ensure proper us…
Browse files Browse the repository at this point in the history
…er handling deploy-test-dolly-backend #deploy-dolly-backend
  • Loading branch information
krharum committed Feb 28, 2025
1 parent 3315d5a commit 63d001e
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ void oppdaterTestgruppe_sjekkAtDBKalles() {
@Test
void getTestgrupper() {
when(testgruppeRepository.findAllByOrderByIdDesc(any(Pageable.class))).thenReturn(new PageImpl<>(emptyList()));
when(brukerService.fetchOrCreateBruker(any())).thenReturn(new Bruker());
testgruppeService.getTestgruppeByBrukerId(0, 10, null);
verify(testgruppeRepository).findAllByOrderByIdDesc(Pageable.ofSize(10));
}
Expand Down

0 comments on commit 63d001e

Please sign in to comment.