fix tests
This commit is contained in:
parent
b56307d4f6
commit
a45d91edcc
|
@ -12,27 +12,15 @@ import { TerritoryProfile } from '../../mappers/territory.profile';
|
||||||
|
|
||||||
const newTerritoryRequest: CreateTerritoryRequest = {
|
const newTerritoryRequest: CreateTerritoryRequest = {
|
||||||
name: 'Grand Est',
|
name: 'Grand Est',
|
||||||
shape: {
|
shape:
|
||||||
type: 'MultiPolygon',
|
'[[[[838383.2, 6570485.8],[838483.8, 6570697.7],[838688.1, 6571298.4],[838809.5, 6571599.9],[838383.2, 6570485.8]]]]',
|
||||||
coordinates: [
|
|
||||||
[
|
|
||||||
[
|
|
||||||
[838383.2, 6570485.8],
|
|
||||||
[838483.8, 6570697.7],
|
|
||||||
[838688.1, 6571298.4],
|
|
||||||
[838809.5, 6571599.9],
|
|
||||||
[838383.2, 6570485.8],
|
|
||||||
],
|
|
||||||
],
|
|
||||||
],
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
const newTerritoryCommand: CreateTerritoryCommand = new CreateTerritoryCommand(
|
const newTerritoryCommand: CreateTerritoryCommand = new CreateTerritoryCommand(
|
||||||
newTerritoryRequest,
|
newTerritoryRequest,
|
||||||
);
|
);
|
||||||
|
|
||||||
const mockTerritoriesRepository = {
|
const mockTerritoriesRepository = {
|
||||||
create: jest
|
createTerritory: jest
|
||||||
.fn()
|
.fn()
|
||||||
.mockImplementationOnce(() => {
|
.mockImplementationOnce(() => {
|
||||||
return Promise.resolve({
|
return Promise.resolve({
|
||||||
|
|
|
@ -9,56 +9,20 @@ const mockTerritories = [
|
||||||
{
|
{
|
||||||
uuid: 'bb281075-1b98-4456-89d6-c643d3044a91',
|
uuid: 'bb281075-1b98-4456-89d6-c643d3044a91',
|
||||||
name: 'Grand Est',
|
name: 'Grand Est',
|
||||||
shape: {
|
shape:
|
||||||
type: 'MultiPolygon',
|
'[[[[838383.2, 6570485.8],[838483.8, 6570697.7],[838688.1, 6571298.4],[838809.5, 6571599.9],[838383.2, 6570485.8]]]]',
|
||||||
coordinates: [
|
|
||||||
[
|
|
||||||
[
|
|
||||||
[838383.2, 6570485.8],
|
|
||||||
[838483.8, 6570697.7],
|
|
||||||
[838688.1, 6571298.4],
|
|
||||||
[838809.5, 6571599.9],
|
|
||||||
[838383.2, 6570485.8],
|
|
||||||
],
|
|
||||||
],
|
|
||||||
],
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
uuid: 'bb281075-1b98-4456-89d6-c643d3044a92',
|
uuid: 'bb281075-1b98-4456-89d6-c643d3044a92',
|
||||||
name: 'Nouvelle Aquitaine',
|
name: 'Nouvelle Aquitaine',
|
||||||
shape: {
|
shape:
|
||||||
type: 'MultiPolygon',
|
'[[[[838383.2, 6570485.8],[838483.8, 6570697.7],[838688.1, 6571298.4],[838809.5, 6571599.9],[838383.2, 6570485.8]]]]',
|
||||||
coordinates: [
|
|
||||||
[
|
|
||||||
[
|
|
||||||
[838383.2, 6570485.8],
|
|
||||||
[838483.8, 6570697.7],
|
|
||||||
[838688.1, 6571298.4],
|
|
||||||
[838809.5, 6571599.9],
|
|
||||||
[838383.2, 6570485.8],
|
|
||||||
],
|
|
||||||
],
|
|
||||||
],
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
uuid: 'bb281075-1b98-4456-89d6-c643d3044a93',
|
uuid: 'bb281075-1b98-4456-89d6-c643d3044a93',
|
||||||
name: 'Occitanie',
|
name: 'Occitanie',
|
||||||
shape: {
|
shape:
|
||||||
type: 'MultiPolygon',
|
'[[[[838383.2, 6570485.8],[838483.8, 6570697.7],[838688.1, 6571298.4],[838809.5, 6571599.9],[838383.2, 6570485.8]]]]',
|
||||||
coordinates: [
|
|
||||||
[
|
|
||||||
[
|
|
||||||
[838383.2, 6570485.8],
|
|
||||||
[838483.8, 6570697.7],
|
|
||||||
[838688.1, 6571298.4],
|
|
||||||
[838809.5, 6571599.9],
|
|
||||||
[838383.2, 6570485.8],
|
|
||||||
],
|
|
||||||
],
|
|
||||||
],
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -16,56 +16,20 @@ const mockTerritories = [
|
||||||
{
|
{
|
||||||
uuid: 'bb281075-1b98-4456-89d6-c643d3044a91',
|
uuid: 'bb281075-1b98-4456-89d6-c643d3044a91',
|
||||||
name: 'Grand Est',
|
name: 'Grand Est',
|
||||||
shape: {
|
shape:
|
||||||
type: 'MultiPolygon',
|
'[[[[838383.2, 6570485.8],[838483.8, 6570697.7],[838688.1, 6571298.4],[838809.5, 6571599.9],[838383.2, 6570485.8]]]]',
|
||||||
coordinates: [
|
|
||||||
[
|
|
||||||
[
|
|
||||||
[838383.2, 6570485.8],
|
|
||||||
[838483.8, 6570697.7],
|
|
||||||
[838688.1, 6571298.4],
|
|
||||||
[838809.5, 6571599.9],
|
|
||||||
[838383.2, 6570485.8],
|
|
||||||
],
|
|
||||||
],
|
|
||||||
],
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
uuid: 'bb281075-1b98-4456-89d6-c643d3044a92',
|
uuid: 'bb281075-1b98-4456-89d6-c643d3044a92',
|
||||||
name: 'Nouvelle Aquitaine',
|
name: 'Nouvelle Aquitaine',
|
||||||
shape: {
|
shape:
|
||||||
type: 'MultiPolygon',
|
'[[[[838383.2, 6570485.8],[838483.8, 6570697.7],[838688.1, 6571298.4],[838809.5, 6571599.9],[838383.2, 6570485.8]]]]',
|
||||||
coordinates: [
|
|
||||||
[
|
|
||||||
[
|
|
||||||
[838383.2, 6570485.8],
|
|
||||||
[838483.8, 6570697.7],
|
|
||||||
[838688.1, 6571298.4],
|
|
||||||
[838809.5, 6571599.9],
|
|
||||||
[838383.2, 6570485.8],
|
|
||||||
],
|
|
||||||
],
|
|
||||||
],
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
uuid: 'bb281075-1b98-4456-89d6-c643d3044a93',
|
uuid: 'bb281075-1b98-4456-89d6-c643d3044a93',
|
||||||
name: 'Occitanie',
|
name: 'Occitanie',
|
||||||
shape: {
|
shape:
|
||||||
type: 'MultiPolygon',
|
'[[[[838383.2, 6570485.8],[838483.8, 6570697.7],[838688.1, 6571298.4],[838809.5, 6571599.9],[838383.2, 6570485.8]]]]',
|
||||||
coordinates: [
|
|
||||||
[
|
|
||||||
[
|
|
||||||
[838383.2, 6570485.8],
|
|
||||||
[838483.8, 6570697.7],
|
|
||||||
[838688.1, 6571298.4],
|
|
||||||
[838809.5, 6571599.9],
|
|
||||||
[838383.2, 6570485.8],
|
|
||||||
],
|
|
||||||
],
|
|
||||||
],
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -9,20 +9,8 @@ import { FindTerritoryByUuidQuery } from '../../queries/find-territory-by-uuid.q
|
||||||
const mockTerritory = {
|
const mockTerritory = {
|
||||||
uuid: 'bb281075-1b98-4456-89d6-c643d3044a91',
|
uuid: 'bb281075-1b98-4456-89d6-c643d3044a91',
|
||||||
name: 'Grand Est',
|
name: 'Grand Est',
|
||||||
shape: {
|
shape:
|
||||||
type: 'MultiPolygon',
|
'[[[[838383.2, 6570485.8],[838483.8, 6570697.7],[838688.1, 6571298.4],[838809.5, 6571599.9],[838383.2, 6570485.8]]]]',
|
||||||
coordinates: [
|
|
||||||
[
|
|
||||||
[
|
|
||||||
[838383.2, 6570485.8],
|
|
||||||
[838483.8, 6570697.7],
|
|
||||||
[838688.1, 6571298.4],
|
|
||||||
[838809.5, 6571599.9],
|
|
||||||
[838383.2, 6570485.8],
|
|
||||||
],
|
|
||||||
],
|
|
||||||
],
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const mockTerritoriesRepository = {
|
const mockTerritoriesRepository = {
|
||||||
|
|
Loading…
Reference in New Issue