diff --git a/backend/src/test/java/mouda/backend/member/repository/MemberRepositoryTest.java b/backend/src/test/java/mouda/backend/member/repository/MemberRepositoryTest.java index e92481e83..f0a78e8fe 100644 --- a/backend/src/test/java/mouda/backend/member/repository/MemberRepositoryTest.java +++ b/backend/src/test/java/mouda/backend/member/repository/MemberRepositoryTest.java @@ -43,7 +43,6 @@ void findNickNamesByMoimId() { .time(LocalTime.now().minusHours(1)) .place("서울시 강북구 중앙로 2길 25") .maxPeople(10) - .authorNickname("안나") .description("모임 설명입니다.") .build(); Moim saveMoim = moimRepository.save(moim); diff --git a/backend/src/test/java/mouda/backend/moim/domain/MoimTest.java b/backend/src/test/java/mouda/backend/moim/domain/MoimTest.java index 94c37bba7..dc2558e10 100644 --- a/backend/src/test/java/mouda/backend/moim/domain/MoimTest.java +++ b/backend/src/test/java/mouda/backend/moim/domain/MoimTest.java @@ -30,7 +30,6 @@ void createMoim() { .time(TIME) .place(PLACE) .maxPeople(MAX_PEOPLE) - .authorNickname(AUTHOR_NICKNAME) .description(DESCRIPTION) .build()); } @@ -45,7 +44,6 @@ void failToCreateMoimWhenTitleIsTooLong() { .time(TIME) .place(PLACE) .maxPeople(MAX_PEOPLE) - .authorNickname(AUTHOR_NICKNAME) .description(DESCRIPTION) .build()); } @@ -59,7 +57,6 @@ void failToCreateMoimWhenTitleDoesNotExists() { .time(TIME) .place(PLACE) .maxPeople(MAX_PEOPLE) - .authorNickname(AUTHOR_NICKNAME) .description(DESCRIPTION) .build()); } @@ -73,7 +70,6 @@ void failToCreateMoimWhenDateIsNull() { .time(TIME) .place(PLACE) .maxPeople(MAX_PEOPLE) - .authorNickname(AUTHOR_NICKNAME) .description(DESCRIPTION) .build()); } @@ -87,7 +83,6 @@ void failToCreateMoimWhenTimeIsNull() { .time(null) .place(PLACE) .maxPeople(MAX_PEOPLE) - .authorNickname(AUTHOR_NICKNAME) .description(DESCRIPTION) .build()); } @@ -101,7 +96,6 @@ void failToCreateMoimWhenDateIsPast() { .time(LocalTime.now().plusHours(1)) .place(PLACE) .maxPeople(MAX_PEOPLE) - .authorNickname(AUTHOR_NICKNAME) .description(DESCRIPTION) .build()); } @@ -115,7 +109,6 @@ void failToCreateMoimWhenTimeIsPast() { .time(LocalTime.now().minusHours(1)) .place(PLACE) .maxPeople(MAX_PEOPLE) - .authorNickname(AUTHOR_NICKNAME) .description(DESCRIPTION) .build()); } @@ -129,7 +122,6 @@ void failToCreateMoimWhenPlaceIsBlank() { .time(LocalTime.now().minusHours(1)) .place("") .maxPeople(MAX_PEOPLE) - .authorNickname(AUTHOR_NICKNAME) .description(DESCRIPTION) .build()); } @@ -144,7 +136,6 @@ void failToCreateMoimWhenPlaceIsTooLong() { .time(TIME) .place(longPlace) .maxPeople(MAX_PEOPLE) - .authorNickname(AUTHOR_NICKNAME) .description(DESCRIPTION) .build()); } @@ -158,7 +149,6 @@ void failToCreateMoimWhenMaxPeopleIsTooSmall() { .time(TIME) .place(PLACE) .maxPeople(-1) - .authorNickname(AUTHOR_NICKNAME) .description(DESCRIPTION) .build()); } @@ -172,36 +162,6 @@ void failToCreateMoimWhenMaxPeopleIsTooMany() { .time(TIME) .place(PLACE) .maxPeople(100) - .authorNickname(AUTHOR_NICKNAME) - .description(DESCRIPTION) - .build()); - } - - @DisplayName("작성자 닉네임이 빈 문자열이면 모임 객체 생성에 실패한다.") - @Test - void failToCreateMoimWhenAuthorNicknameIsBlank() { - assertThrows(MoimException.class, () -> Moim.builder() - .title(TITLE) - .date(DATE) - .time(TIME) - .place(PLACE) - .maxPeople(MAX_PEOPLE) - .authorNickname("") - .description(DESCRIPTION) - .build()); - } - - @DisplayName("작성자 닉네임 길이가 제한을 초과하면 모임 객체 생성에 실패한다.") - @Test - void failToCreateMoimWhenAuthorNicknameIsTooLong() { - String longNickname = "a".repeat(11); - assertThrows(MoimException.class, () -> Moim.builder() - .title(TITLE) - .date(DATE) - .time(TIME) - .place(PLACE) - .maxPeople(MAX_PEOPLE) - .authorNickname(longNickname) .description(DESCRIPTION) .build()); } @@ -215,7 +175,6 @@ void createMoimWhenDescriptionIsNull() { .time(TIME) .place(PLACE) .maxPeople(MAX_PEOPLE) - .authorNickname(AUTHOR_NICKNAME) .description(null) .build()); } @@ -230,7 +189,6 @@ void failToCreateMoimWhenDescriptionIsTooLong() { .time(TIME) .place(PLACE) .maxPeople(MAX_PEOPLE) - .authorNickname(AUTHOR_NICKNAME) .description(longDescription) .build()); } diff --git a/backend/src/test/java/mouda/backend/moim/service/MoimServiceTest.java b/backend/src/test/java/mouda/backend/moim/service/MoimServiceTest.java index c296c3fb1..1174b9560 100644 --- a/backend/src/test/java/mouda/backend/moim/service/MoimServiceTest.java +++ b/backend/src/test/java/mouda/backend/moim/service/MoimServiceTest.java @@ -124,7 +124,7 @@ void deleteMoim() { @Test void failToJoinMoimWhenExceedMaxPeople() { MoimCreateRequest moimCreateRequest = new MoimCreateRequest( - "title", LocalDate.now(), LocalTime.now(), "place", + "title", LocalDate.now().plusDays(1), LocalTime.now(), "place", 2, "안나", "설명" );