diff --git a/src/handler/batchPlateCreation.ts b/src/handler/batchPlateCreation.ts index 932e8e67..1f912f05 100644 --- a/src/handler/batchPlateCreation.ts +++ b/src/handler/batchPlateCreation.ts @@ -2,9 +2,10 @@ import { TechRecordType as TechRecordTypeByVehicle, } from '@dvsa/cvs-type-definitions/types/v3/tech-record/tech-record-vehicle-type'; import { TechRecordType } from '@dvsa/cvs-type-definitions/types/v3/tech-record/tech-record-verb'; +import { SQSEvent } from 'aws-lambda'; import 'dotenv/config'; import { v4 as uuidv4 } from 'uuid'; -import { SQSEvent } from 'aws-lambda'; +import { BatchPlateData } from '../models/batchPlate'; import { PlateReasonForIssue, Plates } from '../models/plate'; import { DocumentName, SQSRequestBody } from '../models/sqsPayload'; import { getBySystemNumberAndCreatedTimestamp, inPlaceRecordUpdate } from '../services/database'; @@ -12,10 +13,9 @@ import { addToSqs } from '../services/sqs'; import { StatusCode } from '../util/enum'; import { flattenArrays, formatTechRecord } from '../util/formatTechRecord'; import logger, { logError } from '../util/logger'; -import { BatchPlateData } from '../models/batchPlate'; export const handler = async (event: SQSEvent): Promise => { - const batchIssuerName = 'CVS Batch Plate Generation'; + const batchIssuerName = 'CVS Batch Plate Generation 2'; let numberOfRecordsUpdated = 0; let numberOfSqsAdded = 0; diff --git a/tests/unit/handler/batchPlateCreation.unit.test.ts b/tests/unit/handler/batchPlateCreation.unit.test.ts index 34eb0b77..879e2554 100644 --- a/tests/unit/handler/batchPlateCreation.unit.test.ts +++ b/tests/unit/handler/batchPlateCreation.unit.test.ts @@ -1,13 +1,13 @@ +import { TechRecordComplete } from '@dvsa/cvs-type-definitions/types/v3/tech-record/tech-record-status'; +import { TechRecordGETHGV, TechRecordGETTRL } from '@dvsa/cvs-type-definitions/types/v3/tech-record/tech-record-verb-vehicle-type'; import { SQSEvent } from 'aws-lambda'; import { v4 as uuidv4 } from 'uuid'; -import { TechRecordGETHGV, TechRecordGETTRL } from '@dvsa/cvs-type-definitions/types/v3/tech-record/tech-record-verb-vehicle-type'; -import { TechRecordComplete } from '@dvsa/cvs-type-definitions/types/v3/tech-record/tech-record-status'; +import { handler } from '../../../src/handler/batchPlateCreation'; import { getBySystemNumberAndCreatedTimestamp, inPlaceRecordUpdate } from '../../../src/services/database'; -import { formatTechRecord } from '../../../src/util/formatTechRecord'; import { addToSqs } from '../../../src/services/sqs'; -import { handler } from '../../../src/handler/batchPlateCreation'; -import logger, { logError } from '../../../src/util/logger'; import { StatusCode } from '../../../src/util/enum'; +import { formatTechRecord } from '../../../src/util/formatTechRecord'; +import logger, { logError } from '../../../src/util/logger'; jest.mock('uuid'); jest.mock('../../../src/services/database'); @@ -131,7 +131,7 @@ describe('Batch Plate Handler', () => { plateSerialNumber: 'existing-batch-plate', plateIssueDate: '2024-01-01T00:00:00.000Z', plateReasonForIssue: 'Replacement', - plateIssuer: 'CVS Batch Plate Generation', + plateIssuer: 'CVS Batch Plate Generation 2', }, ], } as TechRecordGETHGV;