fix the test createFilePlanSpecialContainerWhenExists()

This commit is contained in:
Rodica Sutu
2016-11-02 10:37:15 +02:00
parent 43e483d0bc
commit 026e956df3

View File

@@ -234,13 +234,13 @@ public class FilePlanTests extends BaseRestTest
@Bug(id="RM-4296")
public void createFilePlanSpecialContainerWhenExists(FilePlanComponentAlias filePlanAlias, FilePlanComponentType rmType) throws Exception
{
String rmSiteId = rmSiteAPI.getSite().getGuid();
// Create RM Site if doesn't exist
createRMSiteIfNotExists();
// Authenticate with admin user
filePlanComponentAPI.usingRestWrapper().authenticateUser(dataUser.getAdminUser());
rmSiteAPI.usingRestWrapper().authenticateUser(dataUser.getAdminUser());
// Get the RM site ID
String rmSiteId = rmSiteAPI.getSite().getGuid();
String name = filePlanAlias + getRandomAlphanumeric();
@@ -250,6 +250,8 @@ public class FilePlanTests extends BaseRestTest
.add(NODE_TYPE, rmType.toString())
.getJson();
// Authenticate with admin user
filePlanComponentAPI.usingRestWrapper().authenticateUser(dataUser.getAdminUser());
// Create the special containers into RM site - parent folder
filePlanComponentAPI.createFilePlanComponent(componentProperties, rmSiteId);
filePlanComponentAPI.usingRestWrapper().assertStatusCodeIs(FORBIDDEN);