Skip to content

Commit

Permalink
make test more readable
Browse files Browse the repository at this point in the history
  • Loading branch information
Christoph Knoedlseder committed Oct 9, 2024
1 parent ec7e51b commit 61c115f
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,8 @@ public void deleteUsers(String currentUserLogin) throws Exception {
var users = Set.of(userUtilService.getUserByLogin(TEST_PREFIX + "student1"), userUtilService.getUserByLogin(TEST_PREFIX + "tutor1"),
userUtilService.getUserByLogin(TEST_PREFIX + "editor1"), userUtilService.getUserByLogin(TEST_PREFIX + "instructor1"));

request.delete("/api/admin/users", HttpStatus.OK, users.stream().map(User::getLogin).collect(Collectors.toList()));
var logins = users.stream().map(User::getLogin).toList();
request.delete("/api/admin/users", HttpStatus.OK, logins);

for (var user : users) {
final var deletedUser = userTestRepository.findById(user.getId()).orElseThrow();
Expand Down

0 comments on commit 61c115f

Please sign in to comment.