mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Fixed failing test
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@55078 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -61,21 +61,13 @@ public class EmailMapScriptTest extends BaseRMWebScriptTestCase
|
||||
newMapping.put("to", "rmc:Wibble");
|
||||
|
||||
Response postResponse = sendRequest(new PostRequest(URL_RM_EMAILMAP, newMapping.toString(), APPLICATION_JSON), Status.STATUS_OK);
|
||||
|
||||
JSONObject postResponseContent = new JSONObject(postResponse.getContentAsString());
|
||||
assertTrue(Boolean.parseBoolean(postResponseContent.getString("success")));
|
||||
|
||||
JSONObject postData = postResponseContent.getJSONObject("data");
|
||||
JSONArray postMappings = postData.getJSONArray("mappings");
|
||||
|
||||
assertTrue(postMappings.length() == 21);
|
||||
assertTrue(existsMapping(postMappings));
|
||||
|
||||
postResponse = sendRequest(new PostRequest(URL_RM_EMAILMAP, newMapping.toString(), APPLICATION_JSON), Status.STATUS_OK);
|
||||
postResponseContent = new JSONObject(postResponse.getContentAsString());
|
||||
assertFalse(Boolean.parseBoolean(postResponseContent.getString("success")));
|
||||
assertFalse(postResponseContent.getString("message").isEmpty());
|
||||
|
||||
/** Test DELETE */
|
||||
Response deleteResponse = sendRequest(new DeleteRequest(String.format(URL_RM_EMAILMAP_DELETE, "messageTo", "rmc:Wibble")), Status.STATUS_OK);
|
||||
JSONObject deleteResponseContent = new JSONObject(deleteResponse.getContentAsString());
|
||||
|
Reference in New Issue
Block a user