diff --git a/src/main/java/cz/cvut/kbss/study/rest/RoleGroupController.java b/src/main/java/cz/cvut/kbss/study/rest/RoleGroupController.java index 4af3e733..04afc860 100644 --- a/src/main/java/cz/cvut/kbss/study/rest/RoleGroupController.java +++ b/src/main/java/cz/cvut/kbss/study/rest/RoleGroupController.java @@ -19,7 +19,7 @@ @ConditionalOnProperty(prefix = "security", name = "provider", havingValue = "internal", matchIfMissing = true) @RestController -@RequestMapping("/roleGroup") +@RequestMapping("/roleGroups") public class RoleGroupController extends BaseController{ private final RoleGroupService roleGroupService; diff --git a/src/test/java/cz/cvut/kbss/study/rest/RoleGroupControllerTest.java b/src/test/java/cz/cvut/kbss/study/rest/RoleGroupControllerTest.java index d27c1ca7..0ad2c425 100644 --- a/src/test/java/cz/cvut/kbss/study/rest/RoleGroupControllerTest.java +++ b/src/test/java/cz/cvut/kbss/study/rest/RoleGroupControllerTest.java @@ -47,7 +47,7 @@ public void testGetRoleGroups() throws Exception { when(roleGroupServiceMock.findAll()).thenReturn(List.of(roleGroup)); - final MvcResult result = mockMvc.perform(get("/roleGroup/")).andReturn(); + final MvcResult result = mockMvc.perform(get("/roleGroups/")).andReturn(); final List body = objectMapper.readValue(result.getResponse().getContentAsString(), new TypeReference<>() { @@ -65,7 +65,7 @@ public void testFindByName() throws Exception { when(roleGroupServiceMock.findByName(roleName)).thenReturn(roleGroup); - final MvcResult result = mockMvc.perform(get("/roleGroup/" + roleName)).andReturn(); + final MvcResult result = mockMvc.perform(get("/roleGroups/" + roleName)).andReturn(); final RoleGroup body = objectMapper.readValue(result.getResponse().getContentAsString(), new TypeReference<>() { @@ -81,7 +81,7 @@ public void testFindByName_NotFound() throws Exception { when(roleGroupServiceMock.findByName(roleName)).thenReturn(null); - mockMvc.perform(get("/roleGroup/{name}", roleName) + mockMvc.perform(get("/roleGroups/{name}", roleName) .contentType(MediaType.APPLICATION_JSON)) .andExpect(status().isNotFound()); }