From 09d2b9a3fb4eab43ebce3ea325992220afc89edd Mon Sep 17 00:00:00 2001 From: Phan Huy Tran Date: Wed, 23 Oct 2024 10:13:03 +0200 Subject: [PATCH] Fix tests --- .../integration/project/GetProjectActionTest.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/test/java/de/szut/lf8_starter/integration/project/GetProjectActionTest.java b/src/test/java/de/szut/lf8_starter/integration/project/GetProjectActionTest.java index 751d002..75fc944 100644 --- a/src/test/java/de/szut/lf8_starter/integration/project/GetProjectActionTest.java +++ b/src/test/java/de/szut/lf8_starter/integration/project/GetProjectActionTest.java @@ -2,6 +2,7 @@ package de.szut.lf8_starter.integration.project; import de.szut.lf8_starter.project.ProjectEntity; import de.szut.lf8_starter.project.ProjectRepository; +import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; @@ -24,6 +25,11 @@ class GetProjectActionTest { @Autowired private ProjectRepository projectRepository; + @BeforeEach + void setUp() { + this.projectRepository.deleteAll(); + } + @Test void getProjectTest() throws Exception { var project = new ProjectEntity();