This commit is contained in:
Tom Moor
2018-02-24 20:44:13 -08:00
parent fb19075d0e
commit f3c7fb8bc6
6 changed files with 52 additions and 83 deletions

View File

@ -312,7 +312,7 @@ describe('#documents.create', async () => {
expect(body.data.collection.documents[0].children[0].id).toBe(body.data.id);
});
it('should create as a child', async () => {
it('should error with invalid parentDocument', async () => {
const { user, collection } = await seed();
const res = await server.post('/api/documents.create', {
body: {
@ -325,7 +325,7 @@ describe('#documents.create', async () => {
});
const body = await res.json();
expect(res.status).toEqual(400);
expect(res.status).toEqual(403);
expect(body).toMatchSnapshot();
});
});