Skip to content

[test/#517] Notification 단위테스트 및 통합테스트 코드 작성#559

Merged
kanghana1 merged 5 commits intodevelopfrom
test/#517
Apr 1, 2026
Merged

[test/#517] Notification 단위테스트 및 통합테스트 코드 작성#559
kanghana1 merged 5 commits intodevelopfrom
test/#517

Conversation

@kanghana1
Copy link
Copy Markdown
Contributor

❤️ 기능 설명

  • Notification에 대한 통합테스트, 단위테스트를 작성했습니다.
  • 단위테스트를 작성하면서 알림을 생성순 정렬하지 않는다는 걸 알게되어서 createdAt 기준 내림차순으로 정렬해서 보내도록 코드를 수정했습니다.
  • FCM 관련 테스트는 Firebase를 Mock처리해서 작성하였습니다.
스크린샷 2026-03-30 173317 스크린샷 2026-03-30 173340 스크린샷 2026-03-30 174513

연결된 issue

연결된 issue를 자동으로 닫기 위해 아래 {이슈넘버}를 입력해주세요.

close #517




✅ 체크리스트

  • PR 제목 규칙 잘 지켰는가?
  • 추가/수정사항을 설명하였는가?
  • 테스트 결과 사진을 넣었는가?
  • 이슈넘버를 적었는가?

@kanghana1 kanghana1 requested review from Dimo-2562 and dbalsk March 30, 2026 09:12
@kanghana1 kanghana1 self-assigned this Mar 30, 2026
@kanghana1 kanghana1 added the TEST 테스트코드를 짭시다 label Mar 30, 2026
Copy link
Copy Markdown
Contributor

@Dimo-2562 Dimo-2562 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

너무 고생하셨습니다! 확인 한 번 부탁드립니다~


@Nested
@DisplayName("createNotification - 알림 생성")
class CreateNotification {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

단위 테스트 - createNotification
PARTY_DELETE, PARTY_INVITE, EXERCISE_DELETE 이렇게 3개만 검증이 된거 같은데 이 밖에도 분기가 많은거 같습니다. 혹시 나머지를 따로 검증하지 않은 이유가 있을까요??

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

알림의 내용만 변경될 뿐 코드 흐름자체는 동일하기때문에 모든 분기를 다 작성할 필요는 없다고 생각해서 생략했습니다! 추가하는 게 좋을까요?

@kanghana1 kanghana1 merged commit d3e14f7 into develop Apr 1, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

TEST 테스트코드를 짭시다

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[TEST] Notification 테스트코드 작성

2 participants