Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BE/TEST] 각종 테스트 #376

Merged
merged 13 commits into from
Jul 19, 2024
Merged

[BE/TEST] 각종 테스트 #376

merged 13 commits into from
Jul 19, 2024

Conversation

LJH098
Copy link
Collaborator

@LJH098 LJH098 commented Jul 12, 2024

📌 관련 이슈

closes #359

🔑 주요 변경사항

  • DeleteMemeber 통합테스트
  • UpdateMember 통합테스트
  • UpdateMember Controller 테스트
  • EmitterControllerTest
  • UpdateWeightController 테스트
  • UpdateWeight 통합 테스트
  • GetWeight 통합 테스트

@LJH098 LJH098 requested a review from hwangdaesun July 12, 2024 07:15
@LJH098 LJH098 self-assigned this Jul 12, 2024
- 회원 탈퇴 데이터 검증
Comment on lines 35 to 36
resultActions.andExpect(status().isOk());
assertAll(() -> assertFalse(memberRepository.existsById(memberId)));
Copy link
Collaborator

Choose a reason for hiding this comment

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

회원 탈퇴시 회원 이외에도 제거되는 데이터들도 검증에 포함되어 있으면 좋을 것 같습니다.

Copy link
Collaborator Author

@LJH098 LJH098 Jul 13, 2024

Choose a reason for hiding this comment

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

그런데 굳이 이벤트까지 써가면서 결합도를 낮췄는데 테스트에서 결합도를 높일 필요가 있나 싶어요

Controller 테스트에서 이벤트가 잘 publish되는지 테스트도 하고 있어서 굳이 다른 데이터가 삭제 되었는지 확인 할필요 없지않나

Copy link
Collaborator

@hwangdaesun hwangdaesun Jul 13, 2024

Choose a reason for hiding this comment

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

테스트의 목적이 해당 기능이 의도하는 데로 확인하는 거 아닌가요?
결합도가 올라간다고 통합 테스트시 해야갈 검증을 안 하는 거는 옳지 않다고 생각합니다.

@LJH098 LJH098 merged commit 632b376 into be Jul 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants