From 91d0d68e40e688d7be40483d0b4b430751e1e53d Mon Sep 17 00:00:00 2001 From: Tania Fecheta <tania.fecheta@thinslices.com> Date: Mon, 5 Nov 2018 13:02:58 +0200 Subject: [PATCH] test(reviewer test): add another check for the fragments of the collection --- .../src/tests/collections/get.test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/component-manuscript-manager/src/tests/collections/get.test.js b/packages/component-manuscript-manager/src/tests/collections/get.test.js index 8439d32c1..1d140a8c9 100644 --- a/packages/component-manuscript-manager/src/tests/collections/get.test.js +++ b/packages/component-manuscript-manager/src/tests/collections/get.test.js @@ -65,7 +65,7 @@ describe('Get collections route handler', () => { expect(data[0].currentVersion.authors[0]).not.toHaveProperty('email') }) - it('should see the latest fragment where he is invited if the request user is reviewer', async () => { + it('should return the latest fragment with invitation if the request user is reviewer', async () => { const { reviewer1 } = testFixtures.users const res = await requests.sendRequest({ @@ -74,7 +74,6 @@ describe('Get collections route handler', () => { models, path, }) - expect(res.statusCode).toBe(200) const data = JSON.parse(res._getData()) expect(data).toHaveLength(1) @@ -82,6 +81,7 @@ describe('Get collections route handler', () => { expect(data[0].type).toEqual('collection') expect(data[0].currentVersion.recommendations).toHaveLength(2) expect(data[0].currentVersion.authors[0]).not.toHaveProperty('email') + expect(data[0].fragments).toHaveLength(2) expect(data[0].currentVersion.id).toEqual(data[0].fragments[0]) }) -- GitLab