integration tests

This commit is contained in:
sbriat
2023-05-23 14:00:39 +02:00
parent 72516037d1
commit ca398f43df
8 changed files with 440 additions and 25 deletions

View File

@@ -15,7 +15,7 @@ import { Role } from '../types/role.enum';
import { Geography } from '../entities/geography';
import { IEncodeDirection } from '../../../geography/domain/interfaces/direction-encoder.interface';
import { TimeConverter } from '../entities/time-converter';
import { Coordinate } from 'src/modules/geography/domain/entities/coordinate';
import { Coordinate } from '../../../geography/domain/entities/coordinate';
@CommandHandler(CreateAdCommand)
export class CreateAdUseCase {
@@ -68,8 +68,8 @@ export class CreateAdUseCase {
this.timezone = this.defaultParams.DEFAULT_TIMEZONE;
try {
const timezones = this.timezoneFinder.timezones(
coordinates[0].lat,
coordinates[0].lon,
coordinates[0].lat,
);
if (timezones.length > 0) this.timezone = timezones[0];
} catch (e) {}