mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 01:54:22 +00:00
fixed unit tests: missing parameters should return 400 BAD REQUEST
This commit is contained in:
@@ -275,7 +275,7 @@ public class CollectionRestRepositoryIT extends AbstractControllerIntegrationTes
|
||||
@Test
|
||||
public void findAuthorizedByCommunityWithoutUUIDTest() throws Exception {
|
||||
getClient().perform(get("/api/core/collections/search/findAuthorizedByCommunity"))
|
||||
.andExpect(status().isUnprocessableEntity());
|
||||
.andExpect(status().isBadRequest());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@@ -767,7 +767,7 @@ public class CommunityRestRepositoryIT extends AbstractControllerIntegrationTest
|
||||
@Test
|
||||
public void findAllSubCommunitiesWithoutUUID() throws Exception {
|
||||
getClient().perform(get("/api/core/communities/search/subCommunities"))
|
||||
.andExpect(status().isUnprocessableEntity());
|
||||
.andExpect(status().isBadRequest());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@@ -337,7 +337,7 @@ public class EPersonRestRepositoryIT extends AbstractControllerIntegrationTest {
|
||||
public void findByEmailUnprocessable() throws Exception {
|
||||
String authToken = getAuthToken(admin.getEmail(), password);
|
||||
getClient(authToken).perform(get("/api/eperson/epersons/search/byEmail"))
|
||||
.andExpect(status().isUnprocessableEntity());
|
||||
.andExpect(status().isBadRequest());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -409,7 +409,7 @@ public class EPersonRestRepositoryIT extends AbstractControllerIntegrationTest {
|
||||
public void findByNameUnprocessable() throws Exception {
|
||||
String authToken = getAuthToken(admin.getEmail(), password);
|
||||
getClient(authToken).perform(get("/api/eperson/epersons/search/byName"))
|
||||
.andExpect(status().isUnprocessableEntity());
|
||||
.andExpect(status().isBadRequest());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@@ -165,7 +165,7 @@ public class MetadatafieldRestRepositoryIT extends AbstractControllerIntegration
|
||||
public void findByNullSchema() throws Exception {
|
||||
|
||||
getClient().perform(get("/api/core/metadatafields/search/bySchema"))
|
||||
.andExpect(status().isUnprocessableEntity());
|
||||
.andExpect(status().isBadRequest());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
Reference in New Issue
Block a user