mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 01:54:22 +00:00
added test
This commit is contained in:
@@ -19,8 +19,21 @@ import org.dspace.app.rest.test.AbstractControllerIntegrationTest;
|
|||||||
import org.hamcrest.Matchers;
|
import org.hamcrest.Matchers;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @author Mykhaylo Boychuk (4science.it)
|
||||||
|
*/
|
||||||
public class VocabularyEntryDetailsIT extends AbstractControllerIntegrationTest {
|
public class VocabularyEntryDetailsIT extends AbstractControllerIntegrationTest {
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void findAllTest() throws Exception {
|
||||||
|
String authToken = getAuthToken(admin.getEmail(), password);
|
||||||
|
getClient(authToken).perform(get("/api/submission/vocabularyEntryDetails"))
|
||||||
|
.andExpect(status()
|
||||||
|
.isMethodNotAllowed());
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void findOneTest() throws Exception {
|
public void findOneTest() throws Exception {
|
||||||
String idAuthority = "srsc:SCB110";
|
String idAuthority = "srsc:SCB110";
|
||||||
@@ -37,6 +50,7 @@ public class VocabularyEntryDetailsIT extends AbstractControllerIntegrationTest
|
|||||||
.andExpect(jsonPath("$.otherInformation.parent", is("HUMANITIES and RELIGION")));
|
.andExpect(jsonPath("$.otherInformation.parent", is("HUMANITIES and RELIGION")));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
public void findOneUnauthorizedTest() throws Exception {
|
public void findOneUnauthorizedTest() throws Exception {
|
||||||
String idAuthority = "srsc:SCB110";
|
String idAuthority = "srsc:SCB110";
|
||||||
getClient().perform(get("/api/submission/vocabularyEntryDetails/" + idAuthority))
|
getClient().perform(get("/api/submission/vocabularyEntryDetails/" + idAuthority))
|
||||||
|
Reference in New Issue
Block a user