diff --git a/api-v3/test/unit/f3-1-chronological-merge.test.ts b/api-v3/test/unit/f3-1-chronological-merge.test.ts index 8f9b96c..37c364f 100644 --- a/api-v3/test/unit/f3-1-chronological-merge.test.ts +++ b/api-v3/test/unit/f3-1-chronological-merge.test.ts @@ -19,12 +19,14 @@ test('F3.1 registra cada fusión como evento append-only con snapshots', () => { assert.match(migration, /append-only/); }); -test('F3.1 sólo permite fusionar Instalaciones o Subinstalaciones compatibles', () => { +test('F3.1/F5 sólo permite fusionar Instalaciones o Subinstalaciones compatibles dentro de la misma Área física', () => { assert.match(service, /MERGEABLE_TYPES = new Set\(\['instalacion', 'subinstalacion'\]\)/); assert.match(service, /INVENTORY_MERGE_TYPE_INVALID/); - assert.match(service, /INVENTORY_MERGE_CONTEXT_MISMATCH/); + assert.match(service, /resolvePhysicalAreaId/); + assert.match(service, /INVENTORY_MERGE_AREA_MISMATCH/); assert.match(service, /INVENTORY_MERGE_PARENT_MISMATCH/); assert.match(service, /INVENTORY_MERGE_CHILD_FAMILY_CONFLICT/); + assert.doesNotMatch(service, /source\.operatorCompanyId\s*!==\s*canonical\.operatorCompanyId/); }); test('F3.1 preserva referencias históricas y sólo reubica hijos actuales', () => {