test(pause ad): adapt current test after adding pause flag in ad
This commit is contained in:
parent
54d1dab461
commit
be2a2badcf
|
@ -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);
|
||||
|
|
|
@ -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,
|
||||
};
|
||||
|
|
|
@ -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', () => {
|
||||
|
|
|
@ -53,5 +53,6 @@ export function punctualPassengerCreateAdProps(): CreateAdProps {
|
|||
...punctualCreateAdProps,
|
||||
driver: false,
|
||||
passenger: true,
|
||||
pause: false,
|
||||
};
|
||||
}
|
||||
|
|
|
@ -49,6 +49,7 @@ const punctualCreateAdRequest: CreateAdRequestDto = {
|
|||
strict: false,
|
||||
frequency: Frequency.PUNCTUAL,
|
||||
waypoints: [originWaypoint, destinationWaypoint],
|
||||
pause: false,
|
||||
};
|
||||
|
||||
const mockAdRepository = {
|
||||
|
|
|
@ -56,6 +56,7 @@ const punctualPassengerCreateAdProps: CreateAdProps = {
|
|||
...punctualCreateAdProps,
|
||||
driver: false,
|
||||
passenger: true,
|
||||
pause: false,
|
||||
};
|
||||
|
||||
const ads: AdEntity[] = [
|
||||
|
|
|
@ -56,6 +56,7 @@ const punctualPassengerCreateAdProps: CreateAdProps = {
|
|||
...punctualCreateAdProps,
|
||||
driver: false,
|
||||
passenger: true,
|
||||
pause: false,
|
||||
};
|
||||
|
||||
const ads: AdEntity[] = [
|
||||
|
|
|
@ -57,6 +57,7 @@ const punctualPassengerCreateAdProps: CreateAdProps = {
|
|||
...punctualCreateAdProps,
|
||||
driver: false,
|
||||
passenger: true,
|
||||
pause: false,
|
||||
};
|
||||
|
||||
const ad: AdEntity = AdEntity.create(punctualPassengerCreateAdProps);
|
||||
|
|
|
@ -57,6 +57,7 @@ const punctualPassengerCreateAdProps: CreateAdProps = {
|
|||
...punctualCreateAdProps,
|
||||
driver: false,
|
||||
passenger: true,
|
||||
pause: false,
|
||||
};
|
||||
|
||||
const ad: AdEntity = AdEntity.create(punctualPassengerCreateAdProps);
|
||||
|
|
Loading…
Reference in New Issue