Skip to content

Commit

Permalink
[kbss-cvut/record-manager-ui#202] Fix RoleGroupController path
Browse files Browse the repository at this point in the history
  • Loading branch information
palagdan committed Sep 30, 2024
1 parent 209b438 commit 5d9f9aa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<RoleGroup> body = objectMapper.readValue(result.getResponse().getContentAsString(),
new TypeReference<>() {
Expand All @@ -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<>() {
Expand All @@ -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());
}
Expand Down

0 comments on commit 5d9f9aa

Please sign in to comment.