From d30940326ceb68962ce0200570871723b3e3c78c Mon Sep 17 00:00:00 2001
From: Phan Huy Tran
Date: Wed, 23 Oct 2024 10:16:23 +0200
Subject: [PATCH] Fix tests
---
.../integration/project/GetProjectActionTest.java | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
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 75fc944..0b9eb83 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,7 +2,6 @@ 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;
@@ -25,11 +24,6 @@ class GetProjectActionTest {
@Autowired
private ProjectRepository projectRepository;
- @BeforeEach
- void setUp() {
- this.projectRepository.deleteAll();
- }
-
@Test
void getProjectTest() throws Exception {
var project = new ProjectEntity();
@@ -60,6 +54,6 @@ class GetProjectActionTest {
@Test
void getProjectShouldReturnNotFoundResponseWhenProjectIsNotFound() throws Exception {
- this.mockMvc.perform(get("/projects/2")).andExpect(status().isNotFound());
+ this.mockMvc.perform(get("/projects/1111")).andExpect(status().isNotFound());
}
}