diff --git a/src/test/java/com/openisle/controller/CategoryControllerTest.java b/src/test/java/com/openisle/controller/CategoryControllerTest.java index d15c41d65..383d10238 100644 --- a/src/test/java/com/openisle/controller/CategoryControllerTest.java +++ b/src/test/java/com/openisle/controller/CategoryControllerTest.java @@ -2,6 +2,7 @@ package com.openisle.controller; import com.openisle.model.Category; import com.openisle.service.CategoryService; +import com.openisle.service.PostService; import org.junit.jupiter.api.Test; import org.mockito.Mockito; import org.springframework.beans.factory.annotation.Autowired; @@ -26,6 +27,9 @@ class CategoryControllerTest { @MockBean private CategoryService categoryService; + @MockBean + private PostService postService; + @Test void createAndGetCategory() throws Exception { Category c = new Category(); diff --git a/src/test/java/com/openisle/controller/TagControllerTest.java b/src/test/java/com/openisle/controller/TagControllerTest.java index 5f2aca4f6..8ddf08cb9 100644 --- a/src/test/java/com/openisle/controller/TagControllerTest.java +++ b/src/test/java/com/openisle/controller/TagControllerTest.java @@ -2,6 +2,7 @@ package com.openisle.controller; import com.openisle.model.Tag; import com.openisle.service.TagService; +import com.openisle.service.PostService; import org.junit.jupiter.api.Test; import org.mockito.Mockito; import org.springframework.beans.factory.annotation.Autowired; @@ -26,6 +27,9 @@ class TagControllerTest { @MockBean private TagService tagService; + @MockBean + private PostService postService; + @Test void createAndGetTag() throws Exception { Tag t = new Tag();