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

fix-be: applicantCard 조회 시 평가 점수와 갯수가 모든 프로세스에 대해 나오는 버그 수정 #900

Closed
wants to merge 3 commits into from

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Oct 23, 2024

목적

applicantCard 조회 시 평가 점수와 갯수가 현재 위치한 프로세스에 대해서만 나오도록 변경

작업 세부사항

  • [ ]

참고 사항

  • 아래 테스트가 통과하게 해주세요.
    @DisplayName("특정 Process들에 대한 ApplicantCard 목록을 반환한다.")
    @Test
    void mytest() {
        // given
        Process process1 = processRepository.save(ProcessFixture.applyType());
        Process process2 = processRepository.save(ProcessFixture.interview(null));

        Applicant applicant = ApplicantFixture.pendingDobby(process1);
        applicantRepository.save(applicant);

        List<Evaluation> evaluations = List.of(
                // 지원 프로세스에 5점 저장
                EvaluationFixture.fivePoints(process1, applicant),
                // 인터뷰 프로세스에 4점 저장
                EvaluationFixture.fourPoints(process2, applicant)
        );
        evaluationRepository.saveAll(evaluations);

        // when
        // 평가는 특정 지원자의 현재 위치하는 프로세스에 대해서만 조회해야함.
        List<ApplicantCard> applicantCards = applicantRepository.findApplicantCardsByProcesses(List.of(process1));

        // then
        ApplicantCard applicantCard1 = applicantCards.get(0);
        assertAll(
                () -> assertThat(applicantCard1.evaluationCount()).isEqualTo(1),
                () -> assertThat(applicantCard1.averageScore()).isEqualTo(5.0)
        );
    }

아래의 별표줄 밑에 요구사항 ID만 작성해주세요. Prefix 금지!


closes #733

@github-actions github-actions bot added backend 백엔드 fix 버그 수정 labels Oct 23, 2024
@HyungHoKim00 HyungHoKim00 deleted the be-733- branch October 23, 2024 05:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend 백엔드 fix 버그 수정
Projects
Status: 완료
Development

Successfully merging this pull request may close these issues.

1 participant