Execute reviewed tenant merges safely
This commit is contained in:
@@ -54,3 +54,15 @@ test("uses target as the safe default for two-way conflicts", () => {
|
||||
assert.equal(plan.items[0].defaultDecision, "target")
|
||||
assert.deepEqual(plan.items[0].differences.sort(), ["id", "label"])
|
||||
})
|
||||
|
||||
test("ignores maintenance locks and audit timestamps during comparison", () => {
|
||||
const plan = buildTenantMergePlan({
|
||||
tenants: [{ id: 42, name: "Tenant", locked: null, updatedAt: "before" }],
|
||||
}, {
|
||||
tenants: [{ id: 42, name: "Tenant", locked: "maintenance_tenant", updatedAt: "after" }],
|
||||
}, {
|
||||
tenants: { primaryKey: ["id"] },
|
||||
})
|
||||
|
||||
assert.equal(plan.items[0].kind, "existing")
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user