Skip to content

Commit

Permalink
fix: 회고 수정 기능 버그 (#252)
Browse files Browse the repository at this point in the history
* test: test 코드 오류 해결

* fix: deadline null 인 경우 핸들링

* chore: prod로 수정
  • Loading branch information
mikekks authored Oct 30, 2024
1 parent 1d760e6 commit 7cb3f6c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions layer-api/src/main/resources/application-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ spring:
driver-class-name: com.mysql.cj.jdbc.Driver
jpa:
hibernate:
ddl-auto: update
ddl-auto: validate
properties:
hibernate:
format_sql: true
Expand Down Expand Up @@ -49,7 +49,7 @@ google:
sheet:
id: ${GOOGLE_SHEET_ID}
token_path: ${PROD_GOOGLE_TOKEN_PATH}
credential_path: ${PROD_GOOGLE_CREDENTIAL_PATH}
credential_path: ${PROD_GOOGLE_TOKEN_PATH}

apple:
login:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public void validateRetrospectStatusDone() {

public void updateRetrospect(String title, String introduction, LocalDateTime deadline, Time time) {

if (deadline.isBefore(time.now())) {
if (deadline != null && deadline.isBefore(time.now())) {
throw new RetrospectException(INVALID_DEADLINE);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import org.assertj.core.api.Assertions;
import org.junit.jupiter.api.Test;
import org.layer.domain.retrospect.entity.AnalysisStatus;
import org.layer.domain.retrospect.entity.Retrospect;
import org.layer.domain.retrospect.entity.RetrospectStatus;

Expand All @@ -12,7 +13,7 @@ public class RetrospectTest {
@Test
void 진행중인_회고는_진행여부로직에서_예외를_발생시키지_않는다() {
// given
Retrospect retrospect = new Retrospect(1L, "회고제목입니다", "회고소개입니다", RetrospectStatus.PROCEEDING,
Retrospect retrospect = new Retrospect(1L, "회고제목입니다", "회고소개입니다", RetrospectStatus.PROCEEDING, AnalysisStatus.PROCEEDING,
LocalDateTime.of(2024, 8, 4, 3, 5));

// when
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import org.assertj.core.api.Assertions;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.layer.domain.retrospect.entity.AnalysisStatus;
import org.layer.domain.retrospect.entity.Retrospect;
import org.layer.domain.retrospect.entity.RetrospectStatus;
import org.layer.domain.retrospect.repository.RetrospectRepository;
Expand All @@ -21,7 +22,7 @@ public class RetrospectRepositoryTest {
@Test
void 멀티모듈_레포지토리_테스트() {
// given
Retrospect retrospect = new Retrospect(1L, "회고제목입니다", "회고소개입니다", RetrospectStatus.PROCEEDING,
Retrospect retrospect = new Retrospect(1L, "회고제목입니다", "회고소개입니다", RetrospectStatus.PROCEEDING, AnalysisStatus.PROCEEDING,
LocalDateTime.of(2024, 8, 4, 3, 5));

// when
Expand Down

0 comments on commit 7cb3f6c

Please sign in to comment.