mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 10:04:21 +00:00
108915: Added additional tests to prevent incorrect endpoints from being reintroduced again
This commit is contained in:
@@ -109,6 +109,12 @@ public class CommunityRestRepositoryIT extends AbstractControllerIntegrationTest
|
||||
private EPerson collectionAdmin;
|
||||
private EPerson submitter;
|
||||
|
||||
@Test
|
||||
public void singularEndpointShouldNotExist() throws Exception {
|
||||
getClient().perform(get("/api/core/community"))
|
||||
.andExpect(status().isNotFound());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void createTest() throws Exception {
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
|
@@ -265,6 +265,13 @@ public class EPersonRestRepositoryIT extends AbstractControllerIntegrationTest {
|
||||
;
|
||||
}
|
||||
|
||||
@Test
|
||||
public void singularEndpointShouldNotExist() throws Exception {
|
||||
String authToken = getAuthToken(admin.getEmail(), password);
|
||||
getClient(authToken).perform(get("/api/eperson/eperson"))
|
||||
.andExpect(status().isNotFound());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void findAllUnauthorizedTest() throws Exception {
|
||||
// Access endpoint without being authenticated
|
||||
|
Reference in New Issue
Block a user