Skip to content

Commit

Permalink
Fix tests -.-
Browse files Browse the repository at this point in the history
  • Loading branch information
SailReal committed Oct 29, 2024
1 parent e1ccf43 commit 7f6720b
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ void setUp() {
remoteUserPuller.userRepo = userRepo;
remoteUserPuller.groupRepo = groupRepo;
Mockito.doNothing().when(authorityRepo).persistAndFlush(Mockito.any());
Mockito.doNothing().when(userRepo).persistAndFlush(Mockito.any());
Mockito.doNothing().when(groupRepo).persistAndFlush(Mockito.any());
Mockito.doNothing().when(userRepo).persist((User) Mockito.any());
Mockito.doNothing().when(groupRepo).persist((Group) Mockito.any());
}

@Nested
Expand Down Expand Up @@ -156,7 +156,7 @@ public void testUpdateUsers(@ConvertWith(StringArrayConverter.class) String[] ke

for (String userId : updatedUserIds) {
var dbUser = databaseUsers.get(userId);
Mockito.verify(userRepo).persistAndFlush(dbUser);
Mockito.verify(userRepo).persist(dbUser);
Mockito.verify(dbUser).setPictureUrl(String.format("picture %s", userId));
Mockito.verify(dbUser).setName(String.format("name %s", userId));
Mockito.verify(dbUser).setEmail(String.format("email %s", userId));
Expand Down Expand Up @@ -205,7 +205,7 @@ public void testUpdateGroups(@ConvertWith(StringArrayConverter.class) String[] k
var dbGroup = databaseGroups.get(groupId);
Mockito.verify(dbGroup).setName(String.format("name %s", groupId));
MatcherAssert.assertThat(dbGroupMembers, Matchers.containsInAnyOrder(user, otherKCUser));
Mockito.verify(groupRepo).persistAndFlush(dbGroup);
Mockito.verify(groupRepo).persist(dbGroup);
}
}
}
Expand Down

0 comments on commit 7f6720b

Please sign in to comment.