mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-21 18:09:20 +00:00
In the replication webscripts, return single responses still wrapped in data:{} entries
Update unit tests following this json change, and also fix them after the json changes from r21749 git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@21790 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -620,7 +620,7 @@ public class RunningActionRestApiTest extends BaseWebScriptTest
|
||||
assertEquals(Status.STATUS_OK, response.getStatus());
|
||||
|
||||
String jsonStr = response.getContentAsString();
|
||||
JSONObject jsonRD = new JSONObject(jsonStr);
|
||||
JSONObject jsonRD = new JSONObject(jsonStr).getJSONObject("data");
|
||||
assertNotNull(jsonRD);
|
||||
assertEquals(id, jsonRD.get("actionId"));
|
||||
assertEquals(ReplicationDefinitionImpl.EXECUTOR_NAME, jsonRD.get("actionType"));
|
||||
@@ -662,7 +662,7 @@ public class RunningActionRestApiTest extends BaseWebScriptTest
|
||||
assertEquals(Status.STATUS_OK, response.getStatus());
|
||||
|
||||
jsonStr = response.getContentAsString();
|
||||
jsonRD = new JSONObject(jsonStr);
|
||||
jsonRD = new JSONObject(jsonStr).getJSONObject("data");
|
||||
assertNotNull(jsonRD);
|
||||
assertEquals(id2, jsonRD.get("actionId"));
|
||||
assertEquals(ReplicationDefinitionImpl.EXECUTOR_NAME, jsonRD.get("actionType"));
|
||||
@@ -679,7 +679,7 @@ public class RunningActionRestApiTest extends BaseWebScriptTest
|
||||
|
||||
rd = replicationService.loadReplicationDefinition("Test1");
|
||||
jsonStr = response.getContentAsString();
|
||||
jsonRD = new JSONObject(jsonStr);
|
||||
jsonRD = new JSONObject(jsonStr).getJSONObject("data");
|
||||
assertNotNull(jsonRD);
|
||||
assertEquals(id, jsonRD.get("actionId"));
|
||||
assertEquals(ReplicationDefinitionImpl.EXECUTOR_NAME, jsonRD.get("actionType"));
|
||||
@@ -702,7 +702,7 @@ public class RunningActionRestApiTest extends BaseWebScriptTest
|
||||
assertEquals(Status.STATUS_OK, response.getStatus());
|
||||
|
||||
jsonStr = response.getContentAsString();
|
||||
jsonRD = new JSONObject(jsonStr);
|
||||
jsonRD = new JSONObject(jsonStr).getJSONObject("data");
|
||||
assertNotNull(jsonRD);
|
||||
assertEquals(id3, jsonRD.get("actionId"));
|
||||
assertEquals(ReplicationDefinitionImpl.EXECUTOR_NAME, jsonRD.get("actionType"));
|
||||
@@ -834,7 +834,7 @@ public class RunningActionRestApiTest extends BaseWebScriptTest
|
||||
|
||||
// Check we got back some details on it
|
||||
String jsonStr = response.getContentAsString();
|
||||
JSONObject jsonRD = new JSONObject(jsonStr);
|
||||
JSONObject jsonRD = new JSONObject(jsonStr).getJSONObject("data");
|
||||
assertNotNull(jsonRD);
|
||||
|
||||
assertEquals(id, jsonRD.get("actionId"));
|
||||
@@ -916,7 +916,7 @@ public class RunningActionRestApiTest extends BaseWebScriptTest
|
||||
|
||||
// Check we got back some details on it
|
||||
String jsonStr = response.getContentAsString();
|
||||
JSONObject jsonRD = new JSONObject(jsonStr);
|
||||
JSONObject jsonRD = new JSONObject(jsonStr).getJSONObject("data");
|
||||
assertNotNull(jsonRD);
|
||||
|
||||
assertEquals(id, jsonRD.get("actionId"));
|
||||
|
Reference in New Issue
Block a user