Fixing failing test data - now requires valid "from" param

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@55077 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Gethin James
2013-09-07 22:08:10 +00:00
parent 018bd7f557
commit ea3dee91c0

View File

@@ -57,7 +57,7 @@ public class EmailMapScriptTest extends BaseRMWebScriptTestCase
/** Test POST */
JSONObject newMapping = new JSONObject();
newMapping.put("from", "whatever");
newMapping.put("from", "messageTo");
newMapping.put("to", "rmc:Wibble");
Response postResponse = sendRequest(new PostRequest(URL_RM_EMAILMAP, newMapping.toString(), APPLICATION_JSON), Status.STATUS_OK);
@@ -77,7 +77,7 @@ public class EmailMapScriptTest extends BaseRMWebScriptTestCase
assertFalse(postResponseContent.getString("message").isEmpty());
/** Test DELETE */
Response deleteResponse = sendRequest(new DeleteRequest(String.format(URL_RM_EMAILMAP_DELETE, "whatever", "rmc:Wibble")), Status.STATUS_OK);
Response deleteResponse = sendRequest(new DeleteRequest(String.format(URL_RM_EMAILMAP_DELETE, "messageTo", "rmc:Wibble")), Status.STATUS_OK);
JSONObject deleteResponseContent = new JSONObject(deleteResponse.getContentAsString());
JSONObject deleteData = deleteResponseContent.getJSONObject("data");
JSONArray deleteMappings = deleteData.getJSONArray("mappings");
@@ -100,7 +100,7 @@ public class EmailMapScriptTest extends BaseRMWebScriptTestCase
{
String from = mappings.getJSONObject(i).getString("from");
String to = mappings.getJSONObject(i).getString("to");
if (from.equalsIgnoreCase("whatever") && to.equalsIgnoreCase("rmc:Wibble"))
if (from.equalsIgnoreCase("messageTo") && to.equalsIgnoreCase("rmc:Wibble"))
{
result = true;
break;