From a4e8892630ba636ec62452cbb634aa9e12cc3a84 Mon Sep 17 00:00:00 2001 From: nuyh Date: Mon, 31 Jul 2023 15:30:03 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20Keyword=20=EC=A0=80=EC=9E=A5=20=EC=8B=9C?= =?UTF-8?q?=20=EC=84=B8=EC=85=98=EA=B3=BC=EC=9D=98=20=EC=97=B0=EA=B4=80=20?= =?UTF-8?q?=EA=B4=80=EA=B3=84=20violation=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #1397 --- .../roadmap/application/RecommendedServiceTest.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/backend/src/test/java/wooteco/prolog/roadmap/application/RecommendedServiceTest.java b/backend/src/test/java/wooteco/prolog/roadmap/application/RecommendedServiceTest.java index ef10a52d2..644c80785 100644 --- a/backend/src/test/java/wooteco/prolog/roadmap/application/RecommendedServiceTest.java +++ b/backend/src/test/java/wooteco/prolog/roadmap/application/RecommendedServiceTest.java @@ -12,6 +12,8 @@ import wooteco.prolog.roadmap.domain.RecommendedPost; import wooteco.prolog.roadmap.domain.repository.KeywordRepository; import wooteco.prolog.roadmap.domain.repository.RecommendedRepository; +import wooteco.prolog.session.domain.Session; +import wooteco.prolog.session.domain.repository.SessionRepository; import java.util.Optional; @@ -28,13 +30,15 @@ class RecommendedServiceTest { private RecommendedRepository recommendedRepository; @Autowired private KeywordRepository keywordRepository; + @Autowired + private SessionRepository sessionRepository; private Keyword keyword; @BeforeEach public void init() { - final Keyword keyword = Keyword.createKeyword("이름", "설명", 1, 1, 1L, null); - this.keyword = keywordRepository.save(keyword); + final Session session = sessionRepository.save(new Session("레벨 1")); + this.keyword = keywordRepository.save(Keyword.createKeyword("이름", "설명", 1, 1, session.getId(), null)); } @Test