mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
minor updates
This commit is contained in:
@@ -336,14 +336,13 @@ public class RecordCategoryTest extends BaseRestTest
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <pre>
|
|
||||||
* Given that a record category exists
|
* Given that a record category exists
|
||||||
* When I ask to create a object type which is not a record category or a record folder as a child
|
* When I ask to create a object type which is not a record category or a record folder as a child
|
||||||
* Then the children are not created and the 422 response code is returned
|
* Then the children are not created and the 422 response code is returned
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
(
|
(
|
||||||
description = "Create object types not allowed inside a category",
|
description = "Create node types not allowed inside a category",
|
||||||
dataProviderClass = TestData.class,
|
dataProviderClass = TestData.class,
|
||||||
dataProvider = "childrenNotAllowedForCategory"
|
dataProvider = "childrenNotAllowedForCategory"
|
||||||
|
|
||||||
@@ -355,6 +354,7 @@ public class RecordCategoryTest extends BaseRestTest
|
|||||||
filePlanComponentAPI.usingRestWrapper().authenticateUser(dataUser.getAdminUser());
|
filePlanComponentAPI.usingRestWrapper().authenticateUser(dataUser.getAdminUser());
|
||||||
FilePlanComponent category = createCategory(FILE_PLAN_ALIAS.toString(), COMPONENT_NAME);
|
FilePlanComponent category = createCategory(FILE_PLAN_ALIAS.toString(), COMPONENT_NAME);
|
||||||
|
|
||||||
|
//Build node properties
|
||||||
JsonObject componentProperties = buildObject()
|
JsonObject componentProperties = buildObject()
|
||||||
.add(NAME, COMPONENT_NAME)
|
.add(NAME, COMPONENT_NAME)
|
||||||
.add(NODE_TYPE, nodeType)
|
.add(NODE_TYPE, nodeType)
|
||||||
@@ -363,6 +363,7 @@ public class RecordCategoryTest extends BaseRestTest
|
|||||||
.end()
|
.end()
|
||||||
.getJson();
|
.getJson();
|
||||||
|
|
||||||
|
//create the invalid node type
|
||||||
FilePlanComponent fpc = filePlanComponentAPI.createFilePlanComponent(componentProperties, category.getId());
|
FilePlanComponent fpc = filePlanComponentAPI.createFilePlanComponent(componentProperties, category.getId());
|
||||||
filePlanComponentAPI.usingRestWrapper().assertStatusCodeIs(UNPROCESSABLE_ENTITY);
|
filePlanComponentAPI.usingRestWrapper().assertStatusCodeIs(UNPROCESSABLE_ENTITY);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user