Working recently edited list

This commit is contained in:
Tom Moor
2017-11-19 21:32:18 -08:00
parent dc242038ff
commit 81edb55d56
7 changed files with 49 additions and 9 deletions

View File

@ -34,6 +34,17 @@ describe('#documents.list', async () => {
expect(body.data[1].id).toEqual(document.id);
});
it('should allow filtering by collection', async () => {
const { user, document } = await seed();
const res = await server.post('/api/documents.list', {
body: { token: user.getJwtToken(), collectionId: document.atlasId },
});
const body = await res.json();
expect(res.status).toEqual(200);
expect(body.data.length).toEqual(2);
});
it('should require authentication', async () => {
const res = await server.post('/api/documents.list');
const body = await res.json();