Skip to content

Commit

Permalink
fix : 테스트 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
JayPark7821 committed Dec 15, 2023
1 parent f5d191e commit 29fa0e7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
import org.springframework.test.web.servlet.ResultActions;

import com.depromeet.breadmapbackend.domain.admin.Admin;
import com.depromeet.breadmapbackend.domain.admin.carousel.domain.CarouselManager;
import com.depromeet.breadmapbackend.domain.admin.carousel.domain.CarouselType;
import com.depromeet.breadmapbackend.domain.admin.category.domain.Category;
import com.depromeet.breadmapbackend.domain.admin.feed.domain.CurationBakery;
import com.depromeet.breadmapbackend.domain.admin.feed.domain.CurationFeed;
Expand Down Expand Up @@ -209,6 +211,7 @@ public void setDown() {
categoryRepository.deleteAllInBatch();
userRepository.deleteAllInBatch();
adminRepository.deleteAllInBatch();
carouselRepository.deleteAllInBatch();
}

@Test
Expand Down Expand Up @@ -355,6 +358,15 @@ public void setDown() {
void 큐레이션피드_수정_테스트() throws Exception {

//given
final CarouselManager carouselManager = CarouselManager.builder()
.targetId(curation.getId())
.carouseled(true)
.carouselType(CarouselType.CURATION)
.bannerImage(customAWSS3Properties.getCloudFront() + "/" + "productImage.jpg")
.carouselOrder(1)
.build();

carouselRepository.save(carouselManager);

CommonFeedRequestDto updateCommon = CommonFeedRequestDto.builder()
.subTitle("업데이트된 큐레이션 테스트 피드")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

import com.depromeet.breadmapbackend.domain.admin.AdminRepository;
import com.depromeet.breadmapbackend.domain.admin.AdminService;
import com.depromeet.breadmapbackend.domain.admin.carousel.repository.CarouselRepository;
import com.depromeet.breadmapbackend.domain.admin.category.repository.CategoryRepository;
import com.depromeet.breadmapbackend.domain.admin.category.service.CategoryService;
import com.depromeet.breadmapbackend.domain.admin.feed.repository.CurationBakeryRepository;
Expand Down Expand Up @@ -227,6 +228,9 @@ public abstract class ControllerTest {
@Autowired
DataSource dataSource;

@Autowired
protected CarouselRepository carouselRepository;

@BeforeEach
void beforeEach() throws Exception {

Expand Down

0 comments on commit 29fa0e7

Please sign in to comment.