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:
Tuna Aksoy
2013-09-08 07:30:18 +00:00
parent ea3dee91c0
commit 1ac5956888

View File

@@ -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());