ALF-9156 Correct site name in listing json, and add a unit test for that

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@29044 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Nick Burch
2011-07-14 16:38:34 +00:00
parent 44dbe4a189
commit 600abe7460
2 changed files with 5 additions and 2 deletions

View File

@@ -544,12 +544,15 @@ public class CalendarRestApiTest extends BaseWebScriptTest
// Check getting all of them
result = getEntries("admin", "2000/01/01"); // TODO From date shouldn't be needed...
result = getEntries("admin", null);
events = result.getJSONArray("events");
assertEquals(3, events.length());
assertEquals(EVENT_TITLE_THREE, events.getJSONObject(0).getString("title"));
assertEquals(EVENT_TITLE_ONE, events.getJSONObject(1).getString("title"));
assertEquals(EVENT_TITLE_TWO, events.getJSONObject(2).getString("title"));
assertEquals(SITE_SHORT_NAME_CALENDAR, events.getJSONObject(0).getString("site"));
assertEquals(SITE_SHORT_NAME_CALENDAR, events.getJSONObject(1).getString("site"));
assertEquals(SITE_SHORT_NAME_CALENDAR, events.getJSONObject(2).getString("site"));
// Now set a date filter to constrain