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