Skip to content

Commit

Permalink
Fix supplier.test.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
aelassas committed Nov 17, 2024
1 parent 6435dc2 commit be34c11
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion api/tests/supplier.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit be34c11

Please sign in to comment.