Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,6 @@ application-dev.yml

### google ###
src/main/resources/credentials/dasomGoogle.json

### google ###
src/main/resources/credentials/dasomGoogle.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,12 @@
import org.springframework.data.jpa.repository.Query;

import java.util.List;

import java.util.Optional;

public interface ApplicantRepository extends JpaRepository<Applicant, Long> {

@Query("SELECT a FROM Applicant a ORDER BY a.id DESC")
Page<Applicant> findAllWithPageRequest(final Pageable pageable);

// 상태별 지원자 조회
List<Applicant> findByStatus(ApplicantStatus status);
List<Applicant> findByStatusIn(List<ApplicantStatus> statuses);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ void apply_success() {

when(request.toEntity()).thenReturn(mockApplicant);
when(applicantRepository.findByStudentNo("20210000")).thenReturn(Optional.empty());

// applicantRepository.save() 메소드에 대한 mocking 추가
when(applicantRepository.save(any(Applicant.class))).thenReturn(mockApplicant);

// GoogleApiService의 appendToSheet() 동작을 가짜로 설정
Expand Down
Loading