Corrected error duplicate container in docker compose
This commit is contained in:
@@ -46,7 +46,6 @@ public class AthleteResource {
|
||||
content = @Content(mediaType = "application/json",
|
||||
schema = @Schema(implementation = AthleteDTO.class)))
|
||||
})
|
||||
|
||||
@PostMapping("/create")
|
||||
@PreAuthorize("hasRole('Admin')") // Only admin can create??
|
||||
public ResponseEntity<AthleteDTO> create(@RequestBody AthleteDTO dto) {
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
package hackathon.FrisbYEE;
|
||||
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.test.web.servlet.client.RestTestClient;
|
||||
|
||||
import hackathon.FrisbYEE.rest.AthleteResource;
|
||||
|
||||
|
||||
class FrisbYEEApplicationTests {
|
||||
|
||||
//Controller
|
||||
private AthleteResource athleteResource;
|
||||
private RestTestClient mockMvc;
|
||||
|
||||
@BeforeEach
|
||||
void setUp() {
|
||||
athleteResource = new AthleteResource();
|
||||
mockMvc = RestTestClient.bindToController(athleteResource).build();
|
||||
}
|
||||
|
||||
@Test
|
||||
void testGetUsers() throws Exception {
|
||||
//mockMvc.perform(get("/api/users"))
|
||||
// .andExpect(status().isOk());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user