From e133097335aa399048144fbaa86a1f4be476e112 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20St=C3=B6hr?= Date: Thu, 4 Jul 2024 12:34:49 +0200 Subject: [PATCH] Also test prerequisite --- .../tum/in/www1/artemis/lecture/CompetencyIntegrationTest.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/test/java/de/tum/in/www1/artemis/lecture/CompetencyIntegrationTest.java b/src/test/java/de/tum/in/www1/artemis/lecture/CompetencyIntegrationTest.java index 0ae0eb82c534..12f558586287 100644 --- a/src/test/java/de/tum/in/www1/artemis/lecture/CompetencyIntegrationTest.java +++ b/src/test/java/de/tum/in/www1/artemis/lecture/CompetencyIntegrationTest.java @@ -46,6 +46,7 @@ import de.tum.in.www1.artemis.domain.competency.CompetencyRelation; import de.tum.in.www1.artemis.domain.competency.CompetencyTaxonomy; import de.tum.in.www1.artemis.domain.competency.CourseCompetency; +import de.tum.in.www1.artemis.domain.competency.Prerequisite; import de.tum.in.www1.artemis.domain.competency.RelationType; import de.tum.in.www1.artemis.domain.enumeration.DifficultyLevel; import de.tum.in.www1.artemis.domain.enumeration.ExerciseMode; @@ -509,12 +510,14 @@ void shouldReturnForbiddenForInstructorOfOtherCourse() throws Exception { void deleteCourseShouldAlsoDeleteCompetencyAndRelations() throws Exception { Competency competency2 = createCompetency(course); CompetencyRelation relation = createRelation(competency, competency2, RelationType.EXTENDS); + Prerequisite prerequisite = prerequisiteUtilService.createPrerequisite(course); request.delete("/api/admin/courses/" + course.getId(), HttpStatus.OK); assertThat(competencyRepository.existsById(competency.getId())).isFalse(); assertThat(competencyRepository.existsById(competency2.getId())).isFalse(); assertThat(competencyRelationRepository.existsById(relation.getId())).isFalse(); + assertThat(prerequisiteRepository.existsById(prerequisite.getId())).isFalse(); } @Nested