Fix
All checks were successful
Quality Check / Tests (pull_request) Successful in 1m8s
Build PR / Build and analyze (pull_request) Successful in 1m47s
gitea-sonarqube-bot OK
Quality Check / Checkstyle Main (pull_request) Successful in 37s

This commit is contained in:
Phan Huy Tran 2024-10-23 10:37:01 +02:00
parent cda04fa8a2
commit fa607435cf

@ -12,7 +12,9 @@ import org.springframework.test.web.servlet.MockMvc;
import java.time.LocalDate;
import java.util.Arrays;
import java.util.Optional;
import static org.assertj.core.api.Assertions.assertThat;
import static org.hamcrest.Matchers.is;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath;
@ -59,7 +61,7 @@ class CreateProjectActionTest {
final long id = Long.parseLong(new JSONObject(contentAsString).get("id").toString());
final ProjectEntity project = this.projectRepository.findById(id);
final Optional<ProjectEntity> project = this.projectRepository.findById(id);
assertThat(project.get().getName()).isEqualTo("name");
assertThat(project.get().getLeadingEmployee()).isEqualTo(1);
assertThat(project.get().getContractor()).isEqualTo(4);