@@ -138,6 +138,7 @@ function createSupplierStatusChangeEvent(
138138 billingRef : "1y3q9v1zzzz" ,
139139 status : "RETURNED" ,
140140 supplierId : "supplier1" ,
141+ specificationBillingId : "billing1" ,
141142 } ,
142143 datacontenttype : "application/json" ,
143144 dataschema :
@@ -175,6 +176,7 @@ describe("createSupplierAllocatorHandler", () => {
175176 supplierId : "supplier1" ,
176177 specId : "spec1" ,
177178 priority : 10 ,
179+ billingId : "billing1" ,
178180 } ,
179181 } ,
180182 } as EnvVars ,
@@ -210,6 +212,7 @@ describe("createSupplierAllocatorHandler", () => {
210212 supplierId : "supplier1" ,
211213 specId : "spec1" ,
212214 priority : 10 ,
215+ billingId : "billing1" ,
213216 } ) ;
214217
215218 assertMetricLogged (
@@ -245,6 +248,7 @@ describe("createSupplierAllocatorHandler", () => {
245248 supplierId : "supplier1" ,
246249 specId : "spec1" ,
247250 priority : 10 ,
251+ billingId : "billing1" ,
248252 } ) ;
249253 } ) ;
250254
@@ -307,11 +311,10 @@ describe("createSupplierAllocatorHandler", () => {
307311
308312 const sendCall = ( mockSqsClient . send as jest . Mock ) . mock . calls [ 0 ] [ 0 ] ;
309313 const messageBody = JSON . parse ( sendCall . input . MessageBody ) ;
310- expect ( messageBody . supplierSpec ) . toEqual ( {
311- supplierId : "supplier1" ,
312- specId : "spec1" ,
313- priority : 10 ,
314- } ) ;
314+ expect ( messageBody . supplierSpec . supplierId ) . toBe ( "supplier1" ) ;
315+ expect ( messageBody . supplierSpec . specId ) . toBe ( "spec1" ) ;
316+ expect ( messageBody . supplierSpec . priority ) . toBe ( 10 ) ;
317+ expect ( messageBody . supplierSpec . billingId ) . toBe ( "billing1" ) ;
315318 } ) ;
316319
317320 test ( "processes multiple messages in batch" , async ( ) => {
0 commit comments