test(pause ad): adapt current test after adding pause flag in ad

This commit is contained in:
Fanch 2024-05-15 14:23:05 +02:00 committed by Fanch
parent 54d1dab461
commit be2a2badcf
9 changed files with 16 additions and 0 deletions

View File

@ -225,6 +225,7 @@ describe('Ad Repository', () => {
},
},
],
pause: false,
};
const adToCreate: AdEntity = AdEntity.create(createAdProps);
@ -301,6 +302,7 @@ describe('Ad Repository', () => {
},
},
],
pause: false,
};
const adToCreate: AdEntity = AdEntity.create(createAdProps);

View File

@ -59,6 +59,7 @@ const adEntity: AdEntity = new AdEntity({
strict: false,
seatsProposed: 3,
seatsRequested: 1,
pause: false,
},
createdAt: now,
updatedAt: now,
@ -112,6 +113,7 @@ const adReadModel: AdReadModel = {
seatsProposed: 3,
seatsRequested: 1,
comment: '',
pause: false,
createdAt: now,
updatedAt: now,
};

View File

@ -90,36 +90,42 @@ const punctualPassengerCreateAdProps: CreateAdProps = {
...punctualCreateAdProps,
driver: false,
passenger: true,
pause: false,
};
const recurrentPassengerCreateAdProps: CreateAdProps = {
...baseCreateAdProps,
...recurrentCreateAdProps,
driver: false,
passenger: true,
pause: false,
};
const punctualDriverCreateAdProps: CreateAdProps = {
...baseCreateAdProps,
...punctualCreateAdProps,
driver: true,
passenger: false,
pause: false,
};
const recurrentDriverCreateAdProps: CreateAdProps = {
...baseCreateAdProps,
...recurrentCreateAdProps,
driver: true,
passenger: false,
pause: false,
};
const punctualDriverPassengerCreateAdProps: CreateAdProps = {
...baseCreateAdProps,
...punctualCreateAdProps,
driver: true,
passenger: true,
pause: false,
};
const recurrentDriverPassengerCreateAdProps: CreateAdProps = {
...baseCreateAdProps,
...recurrentCreateAdProps,
driver: true,
passenger: true,
pause: false,
};
describe('Ad entity create', () => {

View File

@ -53,5 +53,6 @@ export function punctualPassengerCreateAdProps(): CreateAdProps {
...punctualCreateAdProps,
driver: false,
passenger: true,
pause: false,
};
}

View File

@ -49,6 +49,7 @@ const punctualCreateAdRequest: CreateAdRequestDto = {
strict: false,
frequency: Frequency.PUNCTUAL,
waypoints: [originWaypoint, destinationWaypoint],
pause: false,
};
const mockAdRepository = {

View File

@ -56,6 +56,7 @@ const punctualPassengerCreateAdProps: CreateAdProps = {
...punctualCreateAdProps,
driver: false,
passenger: true,
pause: false,
};
const ads: AdEntity[] = [

View File

@ -56,6 +56,7 @@ const punctualPassengerCreateAdProps: CreateAdProps = {
...punctualCreateAdProps,
driver: false,
passenger: true,
pause: false,
};
const ads: AdEntity[] = [

View File

@ -57,6 +57,7 @@ const punctualPassengerCreateAdProps: CreateAdProps = {
...punctualCreateAdProps,
driver: false,
passenger: true,
pause: false,
};
const ad: AdEntity = AdEntity.create(punctualPassengerCreateAdProps);

View File

@ -57,6 +57,7 @@ const punctualPassengerCreateAdProps: CreateAdProps = {
...punctualCreateAdProps,
driver: false,
passenger: true,
pause: false,
};
const ad: AdEntity = AdEntity.create(punctualPassengerCreateAdProps);