mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-16 22:43:12 +00:00
Merge remote-tracking branch 'upstream/main' into #2893
This commit is contained in:
@@ -8,8 +8,6 @@
|
|||||||
package org.dspace.curate;
|
package org.dspace.curate;
|
||||||
|
|
||||||
import static com.jayway.jsonpath.JsonPath.read;
|
import static com.jayway.jsonpath.JsonPath.read;
|
||||||
import static org.hamcrest.Matchers.containsString;
|
|
||||||
import static org.hamcrest.Matchers.containsStringIgnoringCase;
|
|
||||||
import static org.hamcrest.Matchers.is;
|
import static org.hamcrest.Matchers.is;
|
||||||
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;
|
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;
|
||||||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath;
|
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath;
|
||||||
@@ -94,9 +92,7 @@ public class CurationScriptIT extends AbstractControllerIntegrationTest {
|
|||||||
.param("properties",
|
.param("properties",
|
||||||
new Gson().toJson(list)))
|
new Gson().toJson(list)))
|
||||||
// Illegal Argument Exception
|
// Illegal Argument Exception
|
||||||
.andExpect(status().isBadRequest())
|
.andExpect(status().isBadRequest());
|
||||||
// Contains the valid options
|
|
||||||
.andExpect(status().reason(containsString(CurationClientOptions.getTaskOptions().toString())));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -138,9 +134,7 @@ public class CurationScriptIT extends AbstractControllerIntegrationTest {
|
|||||||
.param("properties",
|
.param("properties",
|
||||||
new Gson().toJson(list)))
|
new Gson().toJson(list)))
|
||||||
// Illegal Argument Exception
|
// Illegal Argument Exception
|
||||||
.andExpect(status().isBadRequest())
|
.andExpect(status().isBadRequest());
|
||||||
// Contains -e (the missing required cl option
|
|
||||||
.andExpect(status().reason(containsString("-e")));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -183,9 +177,7 @@ public class CurationScriptIT extends AbstractControllerIntegrationTest {
|
|||||||
.param("properties",
|
.param("properties",
|
||||||
new Gson().toJson(list)))
|
new Gson().toJson(list)))
|
||||||
// Illegal Argument Exception
|
// Illegal Argument Exception
|
||||||
.andExpect(status().isBadRequest())
|
.andExpect(status().isBadRequest());
|
||||||
// Contains email
|
|
||||||
.andExpect(status().reason(containsString("email")));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -208,9 +200,7 @@ public class CurationScriptIT extends AbstractControllerIntegrationTest {
|
|||||||
.param("properties",
|
.param("properties",
|
||||||
new Gson().toJson(list)))
|
new Gson().toJson(list)))
|
||||||
// Illegal Argument Exception
|
// Illegal Argument Exception
|
||||||
.andExpect(status().isBadRequest())
|
.andExpect(status().isBadRequest());
|
||||||
// Contains handle
|
|
||||||
.andExpect(status().reason(containsString("handle")));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -234,9 +224,7 @@ public class CurationScriptIT extends AbstractControllerIntegrationTest {
|
|||||||
.param("properties",
|
.param("properties",
|
||||||
new Gson().toJson(list)))
|
new Gson().toJson(list)))
|
||||||
// Illegal Argument Exception
|
// Illegal Argument Exception
|
||||||
.andExpect(status().isBadRequest())
|
.andExpect(status().isBadRequest());
|
||||||
// Contains invalidHandle
|
|
||||||
.andExpect(status().reason(containsStringIgnoringCase("invalidhandle")));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -278,9 +266,7 @@ public class CurationScriptIT extends AbstractControllerIntegrationTest {
|
|||||||
.param("properties",
|
.param("properties",
|
||||||
new Gson().toJson(list)))
|
new Gson().toJson(list)))
|
||||||
// Illegal Argument Exception
|
// Illegal Argument Exception
|
||||||
.andExpect(status().isBadRequest())
|
.andExpect(status().isBadRequest());
|
||||||
// Contains task
|
|
||||||
.andExpect(status().reason(containsString("task")));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -328,9 +314,7 @@ public class CurationScriptIT extends AbstractControllerIntegrationTest {
|
|||||||
.param("properties",
|
.param("properties",
|
||||||
new Gson().toJson(list)))
|
new Gson().toJson(list)))
|
||||||
// Illegal Argument Exception
|
// Illegal Argument Exception
|
||||||
.andExpect(status().isBadRequest())
|
.andExpect(status().isBadRequest());
|
||||||
// Contains taskFile
|
|
||||||
.andExpect(status().reason(containsString("taskFile")));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
Reference in New Issue
Block a user