feat(employee): add action to remove employee from project (SCRUM-23) #35

Merged
jank merged 4 commits from feature/remove-employee into main 2024-10-23 09:51:12 +00:00
Showing only changes of commit d702a867c7 - Show all commits

@ -17,8 +17,7 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Objects; import java.util.Objects;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.delete; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.*;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
@SpringBootTest @SpringBootTest
@ -75,4 +74,12 @@ class RemoveEmployeeFromProjectIntegrationTest {
return Objects.requireNonNull(response.getBody()).get("access_token").toString(); return Objects.requireNonNull(response.getBody()).get("access_token").toString();
} }
@Test
void removeEmployeeShouldReturn404IfProjectNotFound() throws Exception {
mockMvc.perform(delete("/projects/{projectId}/employees/{employeeId}", 1987234987, 312)
.header(HttpHeaders.AUTHORIZATION, getBearerToken())
.contentType(MediaType.APPLICATION_JSON))
.andExpect(status().isNotFound());
}
} }