diff --git a/src/test/java/de/tum/cit/aet/artemis/core/user/util/UserTestService.java b/src/test/java/de/tum/cit/aet/artemis/core/user/util/UserTestService.java index 33db9c1f117b..f36bf992c4eb 100644 --- a/src/test/java/de/tum/cit/aet/artemis/core/user/util/UserTestService.java +++ b/src/test/java/de/tum/cit/aet/artemis/core/user/util/UserTestService.java @@ -952,7 +952,7 @@ public void getAndCreateParticipationVcsAccessTokenForTeamExercise() throws Exce submissionRepository.delete(submission); participationVCSAccessTokenRepository.deleteAll(); participationRepository.deleteById(submission.getParticipation().getId()); - teamUtilService.deleteAll(); + teamUtilService.deleteTeam(team); } // Test diff --git a/src/test/java/de/tum/cit/aet/artemis/exercise/team/TeamUtilService.java b/src/test/java/de/tum/cit/aet/artemis/exercise/team/TeamUtilService.java index 836cbb105b58..2b012324b150 100644 --- a/src/test/java/de/tum/cit/aet/artemis/exercise/team/TeamUtilService.java +++ b/src/test/java/de/tum/cit/aet/artemis/exercise/team/TeamUtilService.java @@ -248,7 +248,7 @@ public Team createTeam(Set students, User owner, Exercise exercise, String /** * Deletes all teams */ - public void deleteAll() { - teamRepo.deleteAll(); + public void deleteTeam(Team team) { + teamRepo.delete(team); } }