From be34c11451224dd18227f13723bd05a35ecbac41 Mon Sep 17 00:00:00 2001 From: aelassas Date: Sun, 17 Nov 2024 21:27:13 +0100 Subject: [PATCH] Fix supplier.test.ts --- api/tests/supplier.test.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/api/tests/supplier.test.ts b/api/tests/supplier.test.ts index b5d3404d1..68fe92e7c 100644 --- a/api/tests/supplier.test.ts +++ b/api/tests/supplier.test.ts @@ -561,6 +561,10 @@ describe('POST /api/frontend-suppliers', () => { .send(payload) expect(res.statusCode).toBe(200) expect(res.body.length).toBe(1) + payload.carSpecs!.aircon = true + payload.carSpecs!.moreThanFourDoors = true + payload.carSpecs!.moreThanFiveSeats = true + payload.seats = 6 payload.mileage = [bookcarsTypes.Mileage.Limited] res = await request(app) @@ -639,6 +643,10 @@ describe('POST /api/backend-suppliers', () => { .send(payload) expect(res.statusCode).toBe(200) expect(res.body.length).toBeGreaterThan(0) + payload.carSpecs!.aircon = true + payload.carSpecs!.moreThanFourDoors = true + payload.carSpecs!.moreThanFiveSeats = true + payload.seats = 6 payload.mileage = [bookcarsTypes.Mileage.Limited] res = await request(app) @@ -684,7 +692,7 @@ describe('POST /api/backend-suppliers', () => { payload.availability = [bookcarsTypes.Availablity.Unavailable] res = await request(app) - .post('/api/backend-suppliers?s=bmw') + .post('/api/backend-suppliers') .set(env.X_ACCESS_TOKEN, token) .send(payload) expect(res.statusCode).toBe(200)