Merge branch 'fixTests' into 'main'
Fix tests See merge request v3/service/ad!20
This commit is contained in:
commit
1a881572c2
|
@ -70,16 +70,16 @@ describe('Ad Repository', () => {
|
|||
};
|
||||
const originWaypoint = {
|
||||
position: 0,
|
||||
lon: 43.7102,
|
||||
lat: 7.262,
|
||||
lat: 43.7102,
|
||||
lon: 7.262,
|
||||
locality: "'Nice'",
|
||||
postalCode: "'06000'",
|
||||
country: "'France'",
|
||||
};
|
||||
const destinationWaypoint = {
|
||||
position: 1,
|
||||
lon: 43.2965,
|
||||
lat: 5.3698,
|
||||
lat: 43.2965,
|
||||
lon: 5.3698,
|
||||
locality: "'Marseille'",
|
||||
postalCode: "'13000'",
|
||||
country: "'France'",
|
||||
|
@ -211,8 +211,8 @@ describe('Ad Repository', () => {
|
|||
postalCode: '06000',
|
||||
country: 'France',
|
||||
coordinates: {
|
||||
lon: 43.7102,
|
||||
lat: 7.262,
|
||||
lat: 43.7102,
|
||||
lon: 7.262,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -223,8 +223,8 @@ describe('Ad Repository', () => {
|
|||
postalCode: '13000',
|
||||
country: 'France',
|
||||
coordinates: {
|
||||
lon: 43.2965,
|
||||
lat: 5.3698,
|
||||
lat: 43.2965,
|
||||
lon: 5.3698,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -299,8 +299,8 @@ describe('Ad Repository', () => {
|
|||
postalCode: '06000',
|
||||
country: 'France',
|
||||
coordinates: {
|
||||
lon: 43.7102,
|
||||
lat: 7.262,
|
||||
lat: 43.7102,
|
||||
lon: 7.262,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -311,8 +311,8 @@ describe('Ad Repository', () => {
|
|||
postalCode: '13000',
|
||||
country: 'France',
|
||||
coordinates: {
|
||||
lon: 43.2965,
|
||||
lat: 5.3698,
|
||||
lat: 43.2965,
|
||||
lon: 5.3698,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
|
@ -15,8 +15,8 @@ const originWaypointProps: WaypointProps = {
|
|||
postalCode: '54000',
|
||||
country: 'France',
|
||||
coordinates: {
|
||||
lon: 48.689445,
|
||||
lat: 6.17651,
|
||||
lat: 48.689445,
|
||||
lon: 6.17651,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
@ -27,8 +27,8 @@ const destinationWaypointProps: WaypointProps = {
|
|||
postalCode: '75000',
|
||||
country: 'France',
|
||||
coordinates: {
|
||||
lon: 48.8566,
|
||||
lat: 2.3522,
|
||||
lat: 48.8566,
|
||||
lon: 2.3522,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
@ -339,8 +339,8 @@ describe('Ad entity create', () => {
|
|||
postalCode: '54000',
|
||||
country: 'France',
|
||||
coordinates: {
|
||||
lon: 48.689445,
|
||||
lat: 6.17651,
|
||||
lat: 48.689445,
|
||||
lon: 6.17651,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -351,8 +351,8 @@ describe('Ad entity create', () => {
|
|||
postalCode: '75000',
|
||||
country: 'France',
|
||||
coordinates: {
|
||||
lon: 48.8566,
|
||||
lat: 2.3522,
|
||||
lat: 48.8566,
|
||||
lon: 2.3522,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
|
@ -9,8 +9,8 @@ describe('Address value object', () => {
|
|||
postalCode: '54000',
|
||||
country: 'France',
|
||||
coordinates: {
|
||||
lon: 48.689445,
|
||||
lat: 6.17651,
|
||||
lat: 48.689445,
|
||||
lon: 6.17651,
|
||||
},
|
||||
});
|
||||
expect(addressVO.houseNumber).toBe('5');
|
||||
|
@ -18,7 +18,7 @@ describe('Address value object', () => {
|
|||
expect(addressVO.locality).toBe('Nancy');
|
||||
expect(addressVO.postalCode).toBe('54000');
|
||||
expect(addressVO.country).toBe('France');
|
||||
expect(addressVO.coordinates.lon).toBe(48.689445);
|
||||
expect(addressVO.coordinates.lat).toBe(48.689445);
|
||||
expect(addressVO.name).toBeUndefined();
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,10 +3,10 @@ import { Coordinates } from '@modules/ad/core/domain/value-objects/coordinates.v
|
|||
describe('Coordinates value object', () => {
|
||||
it('should create a coordinates value object', () => {
|
||||
const coordinatesVO = new Coordinates({
|
||||
lon: 48.689445,
|
||||
lat: 6.17651,
|
||||
lat: 48.689445,
|
||||
lon: 6.17651,
|
||||
});
|
||||
expect(coordinatesVO.lon).toBe(48.689445);
|
||||
expect(coordinatesVO.lat).toBe(6.17651);
|
||||
expect(coordinatesVO.lat).toBe(48.689445);
|
||||
expect(coordinatesVO.lon).toBe(6.17651);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -18,8 +18,8 @@ import { DateTimeTransformerPort } from '@modules/ad/core/application/ports/date
|
|||
|
||||
const originWaypoint: WaypointDto = {
|
||||
position: 0,
|
||||
lon: 48.689445,
|
||||
lat: 6.17651,
|
||||
lat: 48.689445,
|
||||
lon: 6.17651,
|
||||
houseNumber: '5',
|
||||
street: 'Avenue Foch',
|
||||
locality: 'Nancy',
|
||||
|
@ -28,8 +28,8 @@ const originWaypoint: WaypointDto = {
|
|||
};
|
||||
const destinationWaypoint: WaypointDto = {
|
||||
position: 1,
|
||||
lon: 48.8566,
|
||||
lat: 2.3522,
|
||||
lat: 48.8566,
|
||||
lon: 2.3522,
|
||||
locality: 'Paris',
|
||||
postalCode: '75000',
|
||||
country: 'France',
|
||||
|
|
|
@ -19,8 +19,8 @@ const originWaypointProps: WaypointProps = {
|
|||
postalCode: '54000',
|
||||
country: 'France',
|
||||
coordinates: {
|
||||
lon: 48.689445,
|
||||
lat: 6.17651,
|
||||
lat: 48.689445,
|
||||
lon: 6.17651,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
@ -31,8 +31,8 @@ const destinationWaypointProps: WaypointProps = {
|
|||
postalCode: '75000',
|
||||
country: 'France',
|
||||
coordinates: {
|
||||
lon: 48.8566,
|
||||
lat: 2.3522,
|
||||
lat: 48.8566,
|
||||
lon: 2.3522,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
|
@ -11,8 +11,8 @@ describe('Waypoint value object', () => {
|
|||
postalCode: '54000',
|
||||
country: 'France',
|
||||
coordinates: {
|
||||
lon: 48.689445,
|
||||
lat: 6.17651,
|
||||
lat: 48.689445,
|
||||
lon: 6.17651,
|
||||
},
|
||||
},
|
||||
});
|
||||
|
|
|
@ -11,8 +11,8 @@ import { Test, TestingModule } from '@nestjs/testing';
|
|||
|
||||
const originWaypoint: WaypointDto = {
|
||||
position: 0,
|
||||
lon: 48.689445,
|
||||
lat: 6.17651,
|
||||
lat: 48.689445,
|
||||
lon: 6.17651,
|
||||
houseNumber: '5',
|
||||
street: 'Avenue Foch',
|
||||
locality: 'Nancy',
|
||||
|
@ -21,8 +21,8 @@ const originWaypoint: WaypointDto = {
|
|||
};
|
||||
const destinationWaypoint: WaypointDto = {
|
||||
position: 1,
|
||||
lon: 48.8566,
|
||||
lat: 2.3522,
|
||||
lat: 48.8566,
|
||||
lon: 2.3522,
|
||||
locality: 'Paris',
|
||||
postalCode: '75000',
|
||||
country: 'France',
|
||||
|
|
|
@ -44,8 +44,8 @@ const mockAdMapper = {
|
|||
waypoints: [
|
||||
{
|
||||
position: 0,
|
||||
lon: 48.689445,
|
||||
lat: 6.17651,
|
||||
lat: 48.689445,
|
||||
lon: 6.17651,
|
||||
houseNumber: '5',
|
||||
street: 'Avenue Foch',
|
||||
locality: 'Nancy',
|
||||
|
@ -54,8 +54,8 @@ const mockAdMapper = {
|
|||
},
|
||||
{
|
||||
position: 1,
|
||||
lon: 48.8566,
|
||||
lat: 2.3522,
|
||||
lat: 48.8566,
|
||||
lon: 2.3522,
|
||||
locality: 'Paris',
|
||||
postalCode: '75000',
|
||||
country: 'France',
|
||||
|
|
|
@ -16,8 +16,8 @@ describe('valid position indexes decorator', () => {
|
|||
myClassInstance.waypoints = [
|
||||
{
|
||||
position: 0,
|
||||
lon: 48.8566,
|
||||
lat: 2.3522,
|
||||
lat: 48.8566,
|
||||
lon: 2.3522,
|
||||
locality: 'Paris',
|
||||
postalCode: '75000',
|
||||
country: 'France',
|
||||
|
@ -40,8 +40,8 @@ describe('valid position indexes decorator', () => {
|
|||
myClassInstance.waypoints = [
|
||||
{
|
||||
position: 1,
|
||||
lon: 48.8566,
|
||||
lat: 2.3522,
|
||||
lat: 48.8566,
|
||||
lon: 2.3522,
|
||||
locality: 'Paris',
|
||||
postalCode: '75000',
|
||||
country: 'France',
|
||||
|
|
|
@ -3,8 +3,8 @@ import { WaypointDto } from '@modules/ad/interface/grpc-controllers/dtos/waypoin
|
|||
|
||||
describe('addresses position validator', () => {
|
||||
const mockAddress1: WaypointDto = {
|
||||
lon: 48.689445,
|
||||
lat: 6.17651,
|
||||
lat: 48.689445,
|
||||
lon: 6.17651,
|
||||
houseNumber: '5',
|
||||
street: 'Avenue Foch',
|
||||
locality: 'Nancy',
|
||||
|
@ -12,8 +12,8 @@ describe('addresses position validator', () => {
|
|||
country: 'France',
|
||||
};
|
||||
const mockAddress2: WaypointDto = {
|
||||
lon: 48.8566,
|
||||
lat: 2.3522,
|
||||
lat: 48.8566,
|
||||
lon: 2.3522,
|
||||
locality: 'Paris',
|
||||
postalCode: '75000',
|
||||
country: 'France',
|
||||
|
|
Loading…
Reference in New Issue