From 6005b0661f1d5c461bb102e243cc209a8adc21fa Mon Sep 17 00:00:00 2001 From: Nicolai Ort Date: Sun, 28 Mar 2021 18:46:25 +0200 Subject: [PATCH] Added test for single card generation with returnCards=true ref #180 --- src/tests/cards/cards_add.spec.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/tests/cards/cards_add.spec.ts b/src/tests/cards/cards_add.spec.ts index 9b13baa..4f63826 100644 --- a/src/tests/cards/cards_add.spec.ts +++ b/src/tests/cards/cards_add.spec.ts @@ -156,6 +156,12 @@ describe('POST /api/cards/bulk successfully', () => { expect(res.status).toEqual(200); expect(res.headers['content-type']).toContain("application/json"); }); + it('creating a single new bulk card and letting the system return it should return 200', async () => { + const res = await axios.post(base + '/api/cards/bulk?count=1&returnCards=true', {}, axios_config); + expect(res.status).toEqual(200); + expect(res.headers['content-type']).toContain("application/json"); + expect(res.data[0].id).toBeDefined(); + }); it('creating 50 new bulk card should return 200', async () => { const res = await axios.post(base + '/api/cards/bulk?count=50', {}, axios_config); expect(res.status).toEqual(200);