mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
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:
@@ -454,10 +454,10 @@ public class LinksRestApiTest extends BaseWebScriptTest
|
|||||||
"/node/workspace/" + nodeRef.getStoreRef().getIdentifier() + "/" + nodeRef.getId() + "/comments",
|
"/node/workspace/" + nodeRef.getStoreRef().getIdentifier() + "/" + nodeRef.getId() + "/comments",
|
||||||
link.getString("commentsUrl"));
|
link.getString("commentsUrl"));
|
||||||
|
|
||||||
// Check the created date
|
// Check the created date: compare two java.util.Date objects.
|
||||||
assertEquals(
|
assertEquals(
|
||||||
org.springframework.extensions.surf.util.ISO8601DateFormat.format((Date)nodeService.getProperty(nodeRef, ContentModel.PROP_CREATED)),
|
nodeService.getProperty(nodeRef, ContentModel.PROP_CREATED),
|
||||||
link.getJSONObject("createdOnDate").getString("iso8601"));
|
ISO8601DateFormat.parse(link.getJSONObject("createdOnDate").getString("iso8601")));
|
||||||
|
|
||||||
// Edit
|
// Edit
|
||||||
// We should get a simple message
|
// 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")));
|
assertTrue("The user sould have permission to create a new link.", Boolean.parseBoolean(result.getJSONObject("metadata").getJSONObject("linkPermissions").getString("create")));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user