diff --git a/backend/emm-sale/src/documentTest/java/com/emmsale/EventApiTest.java b/backend/emm-sale/src/documentTest/java/com/emmsale/EventApiTest.java index 78c5073da..e9d90cd3a 100644 --- a/backend/emm-sale/src/documentTest/java/com/emmsale/EventApiTest.java +++ b/backend/emm-sale/src/documentTest/java/com/emmsale/EventApiTest.java @@ -230,7 +230,7 @@ void updateEventTest() throws Exception { event.getLocation(), event.getInformationUrl(), event.getEventPeriod().getStartDate(), event.getEventPeriod().getEndDate(), event.getEventPeriod().getApplyStartDate(), event.getEventPeriod().getApplyEndDate(), - tags, event.getImageUrl(), event.getType(), EventMode.ON_OFFLINE, PaymentType.FREE, + tags, event.getType(), EventMode.ON_OFFLINE, PaymentType.FREE, "행사기관"); final EventDetailResponse response = new EventDetailResponse(1L, request.getName(), @@ -238,7 +238,7 @@ void updateEventTest() throws Exception { request.getApplyStartDateTime(), request.getApplyEndDateTime(), request.getLocation(), EventStatus.IN_PROGRESS.name(), EventStatus.ENDED.name(), tags.stream().map(TagRequest::getName).collect(Collectors.toList()), - request.getImageUrl(), 10, 10, request.getType().toString(), + "image1.jpg", 10, 10, request.getType().toString(), List.of("imageUrl1", "imageUrl2"), "행사기관", "유료"); Mockito.when(eventService.updateEvent(eq(eventId), any(EventDetailRequest.class), any(), any())) @@ -332,7 +332,7 @@ void addEventTest() throws Exception { event.getLocation(), event.getInformationUrl(), event.getEventPeriod().getStartDate(), event.getEventPeriod().getEndDate(), event.getEventPeriod().getApplyStartDate(), event.getEventPeriod().getApplyEndDate(), - tags, event.getImageUrl(), event.getType(), EventMode.ON_OFFLINE, PaymentType.FREE, + tags, event.getType(), EventMode.ON_OFFLINE, PaymentType.FREE, "행사기관"); final EventDetailResponse response = new EventDetailResponse(1L, request.getName(), @@ -340,7 +340,7 @@ void addEventTest() throws Exception { request.getApplyStartDateTime(), request.getApplyEndDateTime(), request.getLocation(), EventStatus.IN_PROGRESS.name(), EventStatus.ENDED.name(), tags.stream().map(TagRequest::getName).collect(Collectors.toList()), - request.getImageUrl(), 10, 10, request.getType().toString(), + "image1.jpg", 10, 10, request.getType().toString(), List.of("imageUrl1", "imageUrl2"), "행사기관", "무료"); Mockito.when(eventService.addEvent(any(EventDetailRequest.class), any(), any())) @@ -412,7 +412,7 @@ void addEventWithEmptyNameTest(final String eventName) throws Exception { eventName, event.getLocation(), event.getInformationUrl(), event.getEventPeriod() .getStartDate(), event.getEventPeriod().getEndDate(), event.getEventPeriod().getApplyStartDate(), event.getEventPeriod().getApplyEndDate(), - tags, event.getImageUrl(), event.getType(), event.getEventMode(), + tags, event.getType(), event.getEventMode(), event.getPaymentType(), event.getOrganization()); final String contents = objectMapper.writeValueAsString(request); //when & then @@ -453,7 +453,7 @@ void addEventWithEmptyLocationTest(final String eventLocation) throws Exception event.getName(), eventLocation, event.getInformationUrl(), event.getEventPeriod() .getStartDate(), event.getEventPeriod().getEndDate(), event.getEventPeriod().getApplyStartDate(), event.getEventPeriod().getApplyEndDate(), - tags, event.getImageUrl(), event.getType(), event.getEventMode(), + tags, event.getType(), event.getEventMode(), event.getPaymentType(), event.getOrganization()); final String contents = objectMapper.writeValueAsString(request); //when & then @@ -495,7 +495,7 @@ void addEventWithInvalidInformationUrlTest(final String informationUrl) throws E event.getName(), event.getLocation(), informationUrl, event.getEventPeriod() .getStartDate(), event.getEventPeriod().getEndDate(), event.getEventPeriod().getApplyStartDate(), event.getEventPeriod().getApplyEndDate(), - tags, event.getImageUrl(), event.getType(), event.getEventMode(), + tags, event.getType(), event.getEventMode(), event.getPaymentType(), event.getOrganization()); final String contents = objectMapper.writeValueAsString(request); //when & then @@ -540,7 +540,6 @@ void addEventWithUnformattedStartDateTimeTest(final String startDateTime) request.put("endDateTime", event.getEventPeriod().getEndDate().toString()); request.put("applyStartDateTime", event.getEventPeriod().getApplyStartDate().toString()); request.put("applyEndDateTime", event.getEventPeriod().getApplyEndDate().toString()); - request.put("imageUrl", event.getImageUrl()); request.put("type", event.getType().name()); request.put("eventMode", event.getEventMode().name()); request.put("paymentType", event.getPaymentType().name()); @@ -588,7 +587,6 @@ void addEventWithUnformattedEndDateTimeTest(final String endDateTime) throws Exc request.put("endDateTime", endDateTime); request.put("applyStartDateTime", event.getEventPeriod().getApplyStartDate().toString()); request.put("applyEndDateTime", event.getEventPeriod().getApplyEndDate().toString()); - request.put("imageUrl", event.getImageUrl()); request.put("type", event.getType().name()); request.put("eventMode", event.getEventMode().name()); request.put("paymentType", event.getPaymentType().name()); diff --git a/backend/emm-sale/src/main/java/com/emmsale/event/application/dto/EventDetailRequest.java b/backend/emm-sale/src/main/java/com/emmsale/event/application/dto/EventDetailRequest.java index 8b9550038..9e801243e 100644 --- a/backend/emm-sale/src/main/java/com/emmsale/event/application/dto/EventDetailRequest.java +++ b/backend/emm-sale/src/main/java/com/emmsale/event/application/dto/EventDetailRequest.java @@ -43,8 +43,6 @@ public class EventDetailRequest { private final LocalDateTime applyEndDateTime; private final List tags; - - private final String imageUrl; private final EventType type; private final EventMode eventMode; diff --git a/backend/emm-sale/src/test/java/com/emmsale/event/application/EventServiceTest.java b/backend/emm-sale/src/test/java/com/emmsale/event/application/EventServiceTest.java index 33d0140c9..27e756e0c 100644 --- a/backend/emm-sale/src/test/java/com/emmsale/event/application/EventServiceTest.java +++ b/backend/emm-sale/src/test/java/com/emmsale/event/application/EventServiceTest.java @@ -582,9 +582,6 @@ class AddEvent { @DisplayName("이벤트를 성공적으로 저장한다.") void addEventTest() { //given - final Image image1 = new Image("image", ImageType.EVENT, 1L, 0, LocalDateTime.now()); - final Image image2 = new Image("image", ImageType.EVENT, 1L, 0, LocalDateTime.now()); - final EventDetailRequest request = new EventDetailRequest( eventName, eventLocation, @@ -594,7 +591,6 @@ void addEventTest() { beforeDateTime, afterDateTime, tagRequests, - imageUrl, type, eventMode, paymentType, @@ -639,7 +635,6 @@ void addEventWithStartDateTimeAfterBeforeDateTimeTest() { beforeDateTime, afterDateTime, tagRequests, - imageUrl, type, eventMode, paymentType, @@ -674,7 +669,6 @@ void addEventWithNotExistTagTest() { beforeDateTime, afterDateTime, tagRequests, - imageUrl, type, eventMode, paymentType, @@ -703,7 +697,6 @@ class UpdateEvent { private final String newName = "새로운 이름"; private final String newLocation = "새로운 장소"; private final String newInformationUrl = "https://새로운-상세-URL.com"; - private final String imageUrl = "https://image.com"; private final LocalDate now = LocalDate.now(); private final PaymentType paymentType = PaymentType.FREE_PAID; private final EventMode eventMode = EventMode.ON_OFFLINE; @@ -725,7 +718,6 @@ void updateEventTest() { beforeDateTime, afterDateTime, newTagRequests, - imageUrl, EventType.CONFERENCE, eventMode, paymentType, @@ -771,7 +763,6 @@ void updateEventWithNotExistsEventTest() { beforeDateTime, afterDateTime, newTagRequests, - imageUrl, EventType.CONFERENCE, eventMode, paymentType, @@ -801,7 +792,6 @@ void updateEventWithStartDateTimeAfterBeforeDateTimeTest() { beforeDateTime, afterDateTime, newTagRequests, - imageUrl, EventType.CONFERENCE, eventMode, paymentType, @@ -835,7 +825,6 @@ void updateEventWithNotExistTagTest() { beforeDateTime, afterDateTime, newTagRequests, - imageUrl, EventType.CONFERENCE, eventMode, paymentType,