mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-08 10:34:25 +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 collectionAdmin;
|
||||||
private EPerson submitter;
|
private EPerson submitter;
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void singularEndpointShouldNotExist() throws Exception {
|
||||||
|
getClient().perform(get("/api/core/community"))
|
||||||
|
.andExpect(status().isNotFound());
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void createTest() throws Exception {
|
public void createTest() throws Exception {
|
||||||
ObjectMapper mapper = new ObjectMapper();
|
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
|
@Test
|
||||||
public void findAllUnauthorizedTest() throws Exception {
|
public void findAllUnauthorizedTest() throws Exception {
|
||||||
// Access endpoint without being authenticated
|
// Access endpoint without being authenticated
|
||||||
|
Reference in New Issue
Block a user