Conversation
개요여러 서비스 계층에 InviteTokenService 의존성을 추가하고, MeetingInfoResponse 응답 객체에 토큰 필드를 포함하여 미팅 조회 시 생성된 초대 토큰을 반환하도록 수정했습니다. 변경사항
코드 리뷰 예상 소요 시간🎯 3 (보통) | ⏱️ ~25분 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Tip Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🧪 테스트 결과164 tests 164 ✅ 30s ⏱️ Results for commit 58d779f. |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
ssolv-api-core/src/test/kotlin/org/depromeet/team3/meeting/application/GetMeetingDetailServiceTest.kt (1)
320-364: 종료된 모임 테스트에서token이null인지 검증하면 좋겠습니다.
isClosed = true인 모임은generateToken이null을 반환해야 합니다. 현재inviteTokenService가 mock 기본값(null)을 반환하므로 테스트가 통과하지만, 명시적으로 검증하면 토큰 생성 로직의 의도가 테스트에 더 잘 드러납니다.💚 검증 추가 제안
assertEquals("종료 모임", result.meetingInfo.title) assertTrue(result.participantList.isEmpty()) + assertEquals(null, result.meetingInfo.token) }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@ssolv-api-core/src/test/kotlin/org/depromeet/team3/meeting/application/GetMeetingDetailServiceTest.kt` around lines 320 - 364, The test for closed meetings should explicitly assert that no invite token is produced: after calling getMeetingDetailService.invoke(meetingId, userId, allowClosed = true) add an assertion that the returned token field (e.g., result.inviteToken or result.meetingInfo.token — whichever field holds the invite token in the response DTO) is null; this makes the intended behavior of inviteTokenService.generateToken (mock default null) explicit and documents that closed meetings do not expose tokens. Ensure you reference the same result property used elsewhere in the test so the assertion compiles.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In
`@ssolv-api-core/src/main/kotlin/org/depromeet/team3/meeting/application/InviteTokenService.kt`:
- Around line 42-50: generateToken currently calls meeting.id.toString() which
will encode the literal "null" when meeting.id is null; update generateToken
(and any callers if needed) to explicitly guard against a null id: check
meeting.id for null at the start of the function and return null (or throw a
defined exception) instead of encoding, so
DataEncoder.encodeWithSeparator(SEPARATOR, meeting.id.toString(), ...) is only
invoked when meeting.id is non-null; reference generateToken, meeting.id,
DataEncoder.encodeWithSeparator, and validateInviteToken when making the change.
---
Nitpick comments:
In
`@ssolv-api-core/src/test/kotlin/org/depromeet/team3/meeting/application/GetMeetingDetailServiceTest.kt`:
- Around line 320-364: The test for closed meetings should explicitly assert
that no invite token is produced: after calling
getMeetingDetailService.invoke(meetingId, userId, allowClosed = true) add an
assertion that the returned token field (e.g., result.inviteToken or
result.meetingInfo.token — whichever field holds the invite token in the
response DTO) is null; this makes the intended behavior of
inviteTokenService.generateToken (mock default null) explicit and documents that
closed meetings do not expose tokens. Ensure you reference the same result
property used elsewhere in the test so the assertion compiles.
🎋 이슈 및 작업중인 브랜치
🔑 주요 내용
Check List
Summary by CodeRabbit
새로운 기능
테스트