Skip to content

Commit

Permalink
test: 수강신청 여부 검증 로직 테스트 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
Sangwook02 committed Oct 9, 2024
1 parent d85696d commit 8d63cdd
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,4 +124,16 @@ class 레포지토리_입력시 {
.hasMessage(STUDY_HISTORY_REPOSITORY_NOT_UPDATABLE_OWNER_MISMATCH.getMessage());
}
}

@Nested
class 스터디_수강신청_여부_확인시 {

@Test
void 해당_스터디를_신청하지_않은_멤버가_있다면_실패한다() {
// when & then
assertThatThrownBy(() -> studyHistoryValidator.validateAppliedToStudy(false))
.isInstanceOf(CustomException.class)
.hasMessage(STUDY_HISTORY_NOT_APPLIED_STUDENT_EXISTS.getMessage());
}
}
}

0 comments on commit 8d63cdd

Please sign in to comment.