Added support to execute actions with multiple parameters

This commit is contained in:
cagache
2018-11-13 14:06:28 +02:00
parent 76d15224fc
commit 46ed5b3899
@@ -2,6 +2,8 @@ package org.alfresco.rest.actions;
import static org.testng.Assert.assertFalse;
import com.google.common.collect.ImmutableMap;
import org.alfresco.dataprep.CMISUtil;
import org.alfresco.rest.RestTest;
import org.alfresco.rest.model.RestActionDefinitionModel;
@@ -86,7 +88,8 @@ public class ActionsTests extends RestTest
@Test(groups = { TestGroup.REST_API, TestGroup.ACTIONS, TestGroup.SANITY})
public void executeAction() throws Exception
{
JSONObject response = restClient.authenticateUser(adminUser).withCoreAPI().usingActions().executeAction("add-features", document, "aspect-name", "cm:versionable");
JSONObject response = restClient.authenticateUser(adminUser).withCoreAPI().usingActions().executeAction
("add-features", document, ImmutableMap.of("aspect-name", "cm:versionable"));
restClient.assertStatusCodeIs(HttpStatus.ACCEPTED);
assertFalse(response.getString("id").isEmpty());