Merged HEAD-BUG-FIX (5.1/Cloud) to HEAD (5.1/Cloud)

101335: Merge RA-SPRINT2 to HEAD-BUG-FIX (5.1)
      100788: Fix LinksRestApiTest so that it is comapring two time-zone independent Date objects instead of strings with (potentially) different timezones.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@101475 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Tatyana Valkevych
2015-04-08 16:26:06 +00:00
parent bc13977b7d
commit f5f40192fa

View File

@@ -454,10 +454,10 @@ public class LinksRestApiTest extends BaseWebScriptTest
"/node/workspace/" + nodeRef.getStoreRef().getIdentifier() + "/" + nodeRef.getId() + "/comments",
link.getString("commentsUrl"));
// Check the created date
// Check the created date: compare two java.util.Date objects.
assertEquals(
org.springframework.extensions.surf.util.ISO8601DateFormat.format((Date)nodeService.getProperty(nodeRef, ContentModel.PROP_CREATED)),
link.getJSONObject("createdOnDate").getString("iso8601"));
nodeService.getProperty(nodeRef, ContentModel.PROP_CREATED),
ISO8601DateFormat.parse(link.getJSONObject("createdOnDate").getString("iso8601")));
// Edit
// We should get a simple message
@@ -760,4 +760,4 @@ public class LinksRestApiTest extends BaseWebScriptTest
assertTrue("The user sould have permission to create a new link.", Boolean.parseBoolean(result.getJSONObject("metadata").getJSONObject("linkPermissions").getString("create")));
}
}
}