From d859e077ff58c197ac79b50fd3ede3c8913c56a2 Mon Sep 17 00:00:00 2001 From: SSung023 <50323157+SSung023@users.noreply.github.com> Date: Fri, 19 Apr 2024 15:22:56 +0900 Subject: [PATCH] =?UTF-8?q?test:=20=ED=8C=8C=EC=9D=BC=20=EA=B4=80=EB=A0=A8?= =?UTF-8?q?=20=ED=85=8C=EC=8A=A4=ED=8A=B8=20=EC=BD=94=EB=93=9C=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../instance/controller/InstanceControllerTest.java | 9 --------- .../challenge/likes/controller/LikesControllerTest.java | 9 --------- .../gitget/profile/controller/ProfileControllerTest.java | 8 -------- 3 files changed, 26 deletions(-) diff --git a/src/test/java/com/genius/gitget/challenge/instance/controller/InstanceControllerTest.java b/src/test/java/com/genius/gitget/challenge/instance/controller/InstanceControllerTest.java index d6bfe860..66e5626c 100644 --- a/src/test/java/com/genius/gitget/challenge/instance/controller/InstanceControllerTest.java +++ b/src/test/java/com/genius/gitget/challenge/instance/controller/InstanceControllerTest.java @@ -14,12 +14,9 @@ import com.genius.gitget.challenge.instance.domain.Progress; import com.genius.gitget.challenge.instance.repository.InstanceRepository; import com.genius.gitget.challenge.user.domain.Role; -import com.genius.gitget.global.file.domain.FileType; -import com.genius.gitget.global.file.domain.Files; import com.genius.gitget.global.file.service.FilesService; import com.genius.gitget.util.TokenTestUtil; import com.genius.gitget.util.WithMockCustomUser; -import com.genius.gitget.util.file.FileTestUtil; import java.time.LocalDateTime; import org.assertj.core.api.Assertions; import org.junit.jupiter.api.BeforeEach; @@ -31,7 +28,6 @@ import org.springframework.test.web.servlet.setup.MockMvcBuilders; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.context.WebApplicationContext; -import org.springframework.web.multipart.MultipartFile; @SpringBootTest @Transactional @@ -145,9 +141,6 @@ public void setup() { private Topic getSavedTopic() { - MultipartFile filename = FileTestUtil.getMultipartFile("sky"); - Files files = filesService.uploadFile(filename, FileType.TOPIC); - Topic topic = topicRepository.save( Topic.builder() .title("title") @@ -157,8 +150,6 @@ private Topic getSavedTopic() { .pointPerPerson(100) .build() ); - topic.setFiles(files); - return topic; } diff --git a/src/test/java/com/genius/gitget/challenge/likes/controller/LikesControllerTest.java b/src/test/java/com/genius/gitget/challenge/likes/controller/LikesControllerTest.java index eb9f78ed..151fa76f 100644 --- a/src/test/java/com/genius/gitget/challenge/likes/controller/LikesControllerTest.java +++ b/src/test/java/com/genius/gitget/challenge/likes/controller/LikesControllerTest.java @@ -21,13 +21,10 @@ import com.genius.gitget.challenge.user.domain.Role; import com.genius.gitget.challenge.user.domain.User; import com.genius.gitget.challenge.user.repository.UserRepository; -import com.genius.gitget.global.file.domain.FileType; -import com.genius.gitget.global.file.domain.Files; import com.genius.gitget.global.file.service.FilesService; import com.genius.gitget.global.security.constants.ProviderInfo; import com.genius.gitget.util.TokenTestUtil; import com.genius.gitget.util.WithMockCustomUser; -import com.genius.gitget.util.file.FileTestUtil; import java.time.LocalDateTime; import org.assertj.core.api.Assertions; import org.junit.jupiter.api.BeforeEach; @@ -40,7 +37,6 @@ import org.springframework.test.web.servlet.setup.MockMvcBuilders; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.context.WebApplicationContext; -import org.springframework.web.multipart.MultipartFile; @SpringBootTest @Transactional @@ -229,9 +225,6 @@ private User getSavedUser() { private Topic getSavedTopic() { - MultipartFile filename = FileTestUtil.getMultipartFile("sky"); - Files files = filesService.uploadFile(filename, FileType.TOPIC); - Topic topic = topicRepository.save( Topic.builder() .title("title") @@ -241,8 +234,6 @@ private Topic getSavedTopic() { .pointPerPerson(100) .build() ); - topic.setFiles(files); - return topic; } diff --git a/src/test/java/com/genius/gitget/profile/controller/ProfileControllerTest.java b/src/test/java/com/genius/gitget/profile/controller/ProfileControllerTest.java index c2b7b1dd..eb91d8a7 100644 --- a/src/test/java/com/genius/gitget/profile/controller/ProfileControllerTest.java +++ b/src/test/java/com/genius/gitget/profile/controller/ProfileControllerTest.java @@ -19,13 +19,10 @@ import com.genius.gitget.challenge.user.domain.Role; import com.genius.gitget.challenge.user.domain.User; import com.genius.gitget.challenge.user.repository.UserRepository; -import com.genius.gitget.global.file.domain.FileType; -import com.genius.gitget.global.file.domain.Files; import com.genius.gitget.global.file.service.FilesService; import com.genius.gitget.global.security.constants.ProviderInfo; import com.genius.gitget.util.TokenTestUtil; import com.genius.gitget.util.WithMockCustomUser; -import com.genius.gitget.util.file.FileTestUtil; import java.time.LocalDateTime; import java.util.ArrayList; import java.util.Arrays; @@ -43,7 +40,6 @@ import org.springframework.test.web.servlet.setup.MockMvcBuilders; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.context.WebApplicationContext; -import org.springframework.web.multipart.MultipartFile; @SpringBootTest @@ -278,9 +274,6 @@ private User getSavedUser() { } private Topic getSavedTopic() { - MultipartFile filename = FileTestUtil.getMultipartFile("sky"); - Files files = filesService.uploadFile(filename, FileType.TOPIC); - Topic topic = topicRepository.save( Topic.builder() .title("title") @@ -290,7 +283,6 @@ private Topic getSavedTopic() { .pointPerPerson(100) .build() ); - topic.setFiles(files); return topic; }