Skip to content

Commit 36a44dc

Browse files
committed
feat: 구글 스프레스 시트 연동 테스트 케이스 작성 및 기능 추가
1 parent 7752aa6 commit 36a44dc

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,6 @@ application-dev.yml
4444

4545
### google ###
4646
src/main/resources/credentials/dasomGoogle.json
47+
48+
### google ###
49+
src/main/resources/credentials/dasomGoogle.json

src/main/java/dmu/dasom/api/domain/google/service/GoogleApiService.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ public void writeToSheet(String spreadsheetId, String range, List<List<Object>>
6363
service.spreadsheets().values()
6464
.update(spreadsheetId, range, body)
6565
.setValueInputOption("USER_ENTERED")
66-
.setInsertDataOption("INSERT_ROWS")
6766
.execute();
6867
} catch (IOException | GeneralSecurityException e) {
6968
logger.error("구글 시트에 데이터를 쓰는 데 실패했습니다.", e);

src/test/java/dmu/dasom/api/domain/applicant/ApplicantServiceTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ void apply_success() {
7070

7171
when(request.toEntity()).thenReturn(mockApplicant);
7272
when(applicantRepository.findByStudentNo("20210000")).thenReturn(Optional.empty());
73+
74+
// applicantRepository.save() 메소드에 대한 mocking 추가
7375
when(applicantRepository.save(any(Applicant.class))).thenReturn(mockApplicant);
7476

7577
// GoogleApiService의 appendToSheet() 동작을 가짜로 설정

0 commit comments

Comments
 (0)