Skip to content

feat(be): modify user service unit test - #3664

Open
juheon429 wants to merge 6 commits into
feat/remove-whitelistfrom
t2803-modify-whitelist-unit-test
Open

feat(be): modify user service unit test#3664
juheon429 wants to merge 6 commits into
feat/remove-whitelistfrom
t2803-modify-whitelist-unit-test

Conversation

@juheon429

@juheon429 juheon429 commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Description

화이트리스트 제거로 인한 test 수정 진행했습니다.

user.service.spec.ts 수정

  • 성균관대생 회원가입 검증 테스트 추가 (studentId/major 없는 경우, @skku.edu 아닌 경우)
    • 일반 대학생 대학교 이름 없는 경우 테스트 추가
    • 성균관대생 회원가입 성공 테스트 추가
    • updateUser 성공 테스트 추가

bruno 수정

  • sign up의 request body에 nickname, jobtype, college 추가 및 docs 수정
  • studentId 존재하지 않는 성균관대학생 case
  • @skku.edu를 사용하지 않는 성균관대학생 case
  • update user의 request body에 nickname, college, profileImageUrl 추가 및 docs 수정

Additional context


Before submitting the PR, please make sure you do the following

@juheon429
juheon429 requested review from nhjbest22 and zero1177 July 28, 2026 16:04

@nhjbest22 nhjbest22 left a comment

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.

수정 요청 드린 부분 확인해주세요

Comment on lines +64 to +65
profileImageUrl:
'https://api.dicebear.com/9.x/notionists/svg?seed=${user.username}',

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.

profileImageUrl 부분 백틱으로 변경해주세요.

https://api.dicebear.com/9.x/notionists/svg?seed=${user.username}

Comment on lines +677 to +678
describe('updateUser', () => {
it('should update user successfully', async () => {

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.

afterEach(() => {
db.user.update = stub().resolves(user)
})

위와 같이 describe와 it 사이에 after 훅 추가해서 매 테스트마다 초기화해주세요

@nhjbest22

Copy link
Copy Markdown
Contributor

https://claude.ai/code/artifact/08cedb99-40e0-4b96-bbb5-5e739411225e

현재 PR에서 소셜 로그인 관련 bruno 문서와 Unit Test를 모두 커버하고 있지 않아서 추가적인 작업이 필요할 것 같습니다.
일단 Claude를 사용해서 작업이 필요한 부분들만 추려냈고, 해당 문서 참조하셔서 작업 진행하시면 될 것 같습니다.

개인적으로는 문서에서 seed.ts 보강 부분은 굳이 필요가 없을 것 같습니다.

@nhjbest22

Copy link
Copy Markdown
Contributor

추가적인 작업도 별도로 branch 만들어서 작업해주시고,
완성되시면 저에게 멘션 걸어주세요

@coderabbitai

coderabbitai Bot commented Sep 1, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Team

Run ID: 7abdf71a-119a-4749-ae8d-8c37abc3baa2

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

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.

2 participants