mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-17 15:03:18 +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
|
@Test
|
||||||
public void findAuthorizedByCommunityWithoutUUIDTest() throws Exception {
|
public void findAuthorizedByCommunityWithoutUUIDTest() throws Exception {
|
||||||
getClient().perform(get("/api/core/collections/search/findAuthorizedByCommunity"))
|
getClient().perform(get("/api/core/collections/search/findAuthorizedByCommunity"))
|
||||||
.andExpect(status().isUnprocessableEntity());
|
.andExpect(status().isBadRequest());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@@ -767,7 +767,7 @@ public class CommunityRestRepositoryIT extends AbstractControllerIntegrationTest
|
|||||||
@Test
|
@Test
|
||||||
public void findAllSubCommunitiesWithoutUUID() throws Exception {
|
public void findAllSubCommunitiesWithoutUUID() throws Exception {
|
||||||
getClient().perform(get("/api/core/communities/search/subCommunities"))
|
getClient().perform(get("/api/core/communities/search/subCommunities"))
|
||||||
.andExpect(status().isUnprocessableEntity());
|
.andExpect(status().isBadRequest());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@@ -337,7 +337,7 @@ public class EPersonRestRepositoryIT extends AbstractControllerIntegrationTest {
|
|||||||
public void findByEmailUnprocessable() throws Exception {
|
public void findByEmailUnprocessable() throws Exception {
|
||||||
String authToken = getAuthToken(admin.getEmail(), password);
|
String authToken = getAuthToken(admin.getEmail(), password);
|
||||||
getClient(authToken).perform(get("/api/eperson/epersons/search/byEmail"))
|
getClient(authToken).perform(get("/api/eperson/epersons/search/byEmail"))
|
||||||
.andExpect(status().isUnprocessableEntity());
|
.andExpect(status().isBadRequest());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -409,7 +409,7 @@ public class EPersonRestRepositoryIT extends AbstractControllerIntegrationTest {
|
|||||||
public void findByNameUnprocessable() throws Exception {
|
public void findByNameUnprocessable() throws Exception {
|
||||||
String authToken = getAuthToken(admin.getEmail(), password);
|
String authToken = getAuthToken(admin.getEmail(), password);
|
||||||
getClient(authToken).perform(get("/api/eperson/epersons/search/byName"))
|
getClient(authToken).perform(get("/api/eperson/epersons/search/byName"))
|
||||||
.andExpect(status().isUnprocessableEntity());
|
.andExpect(status().isBadRequest());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@@ -165,7 +165,7 @@ public class MetadatafieldRestRepositoryIT extends AbstractControllerIntegration
|
|||||||
public void findByNullSchema() throws Exception {
|
public void findByNullSchema() throws Exception {
|
||||||
|
|
||||||
getClient().perform(get("/api/core/metadatafields/search/bySchema"))
|
getClient().perform(get("/api/core/metadatafields/search/bySchema"))
|
||||||
.andExpect(status().isUnprocessableEntity());
|
.andExpect(status().isBadRequest());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
Reference in New Issue
Block a user