Skip to content

Commit

Permalink
Also test prerequisite
Browse files Browse the repository at this point in the history
  • Loading branch information
JohannesStoehr committed Jul 4, 2024
1 parent 17ad330 commit e133097
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit e133097

Please sign in to comment.