@@ -324,25 +324,25 @@ describe('PolicyUtils', () => {
324324 } ;
325325
326326 it ( 'returns undefined if neither option is selected' , ( ) => {
327- expect ( getCustomUnitsForDuplication ( policy , false , false , otherUnit . customUnitID , perDiemUnit . customUnitID ) ) . toBeUndefined ( ) ;
327+ expect ( getCustomUnitsForDuplication ( policy , false , false , { distanceCustomUnitID : otherUnit . customUnitID , perDiemCustomUnitID : perDiemUnit . customUnitID } ) ) . toBeUndefined ( ) ;
328328 } ) ;
329329
330330 it ( 'returns all custom units if both options are selected' , ( ) => {
331- const result = getCustomUnitsForDuplication ( policy , true , true , otherUnit . customUnitID , perDiemUnit . customUnitID ) ;
331+ const result = getCustomUnitsForDuplication ( policy , true , true , { distanceCustomUnitID : otherUnit . customUnitID , perDiemCustomUnitID : perDiemUnit . customUnitID } ) ;
332332 expect ( result ) . toEqual ( policy . customUnits ) ;
333333 } ) ;
334334 it ( 'returns only non-per-diem units if only custom units option is selected' , ( ) => {
335- const result = getCustomUnitsForDuplication ( policy , true , false , otherUnit . customUnitID , perDiemUnit . customUnitID ) ;
335+ const result = getCustomUnitsForDuplication ( policy , true , false , { distanceCustomUnitID : otherUnit . customUnitID , perDiemCustomUnitID : perDiemUnit . customUnitID } ) ;
336336 expect ( result ) . toEqual ( { [ otherUnit . customUnitID ] : otherUnit } ) ;
337337 } ) ;
338338
339339 it ( 'returns only per diem unit if only per diem option is selected' , ( ) => {
340- const result = getCustomUnitsForDuplication ( policy , false , true , otherUnit . customUnitID , perDiemUnit . customUnitID ) ;
340+ const result = getCustomUnitsForDuplication ( policy , false , true , { distanceCustomUnitID : otherUnit . customUnitID , perDiemCustomUnitID : perDiemUnit . customUnitID } ) ;
341341 expect ( result ) . toEqual ( { [ perDiemUnit . customUnitID ] : perDiemUnit } ) ;
342342 } ) ;
343343
344344 it ( 'returns undefined if customUnits is empty' , ( ) => {
345- expect ( getCustomUnitsForDuplication ( policyWithoutCustomUnits , true , true , otherUnit . customUnitID , perDiemUnit . customUnitID ) ) . toBeUndefined ( ) ;
345+ expect ( getCustomUnitsForDuplication ( policyWithoutCustomUnits , true , true , { distanceCustomUnitID : otherUnit . customUnitID , perDiemCustomUnitID : perDiemUnit . customUnitID } ) ) . toBeUndefined ( ) ;
346346 } ) ;
347347 } ) ;
348348 describe ( 'getRateDisplayValue' , ( ) => {
0 commit comments