1
0
mirror of https://github.com/sismics/docs.git synced 2025-12-16 19:21:48 +00:00

Document count in GET /app, TODO

This commit is contained in:
jendib
2013-08-01 13:36:15 +02:00
parent 4d50b220a2
commit 9e5459cafe
4 changed files with 56 additions and 17 deletions

View File

@@ -26,8 +26,13 @@ public class TestAppResource extends BaseJerseyTest {
*/
@Test
public void testAppResource() throws JSONException {
// Login app1
clientUtil.createUser("app1");
String app1Token = clientUtil.login("app1");
// Check the application info
WebResource appResource = resource().path("/app");
appResource.addFilter(new CookieAuthenticationFilter(app1Token));
ClientResponse response = appResource.get(ClientResponse.class);
response = appResource.get(ClientResponse.class);
Assert.assertEquals(Status.OK, Status.fromStatusCode(response.getStatus()));
@@ -40,6 +45,7 @@ public class TestAppResource extends BaseJerseyTest {
Assert.assertTrue(freeMemory > 0);
Long totalMemory = json.getLong("total_memory");
Assert.assertTrue(totalMemory > 0 && totalMemory > freeMemory);
Assert.assertEquals(0, json.getInt("document_count"));
}
/**