Skip to content

Commit

Permalink
Merge pull request #746 from woowacourse-teams/chore/#682
Browse files Browse the repository at this point in the history
스크립트 실행 브랜치 변경
  • Loading branch information
ay-eonii authored Oct 24, 2024
2 parents 9545dd7 + a720f4d commit dffc4da
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/be-rolling-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Rolling Deployment
on:
push:
branches:
- chore/#682
- develop

jobs:
deploy-prod1:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import static org.junit.jupiter.api.Assertions.*;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;

import org.junit.jupiter.api.Assertions;
Expand Down Expand Up @@ -73,10 +74,12 @@ void failToCreateMoimWhenDateIsPast() {
@DisplayName("날짜는 같고, 시간이 현재보다 과거이면 모임 객체 생성에 실패한다.")
@Test
void failToCreateMoimWhenTimeIsPast() {
LocalDateTime oneHourBefore = LocalDateTime.of(LocalDate.of(2024, 10, 24), LocalTime.of(0, 50)).minusHours(1);

assertThrows(MoimException.class, () -> Moim.builder()
.title(TITLE)
.date(LocalDate.now())
.time(LocalTime.now().minusHours(1))
.date(oneHourBefore.toLocalDate())
.time(oneHourBefore.toLocalTime())
.place(PLACE)
.maxPeople(MAX_PEOPLE)
.description(DESCRIPTION)
Expand Down Expand Up @@ -209,8 +212,11 @@ void fail_whenDateIsPast() {
@DisplayName("날짜는 같고, 시간이 현재보다 과거이면 수정할 수 없다.")
@Test
void fail_whenTimeIsPast() {
LocalDateTime oneHourBefore = LocalDateTime.of(LocalDate.of(2024, 10, 24), LocalTime.of(0, 50))
.minusHours(1);

assertThrows(MoimException.class,
() -> moim.update(TITLE, LocalDate.now(), LocalTime.now().minusHours(1), PLACE, MAX_PEOPLE,
() -> moim.update(TITLE, oneHourBefore.toLocalDate(), oneHourBefore.toLocalTime(), PLACE, MAX_PEOPLE,
DESCRIPTION, MAX_PEOPLE + 1));
}

Expand Down

0 comments on commit dffc4da

Please sign in to comment.