fix(fleet): preserve unknown commercial facts for pooled freight
This commit is contained in:
@@ -55,6 +55,18 @@ test('customer identity joins use the same explicit collation as existing fulfil
|
||||
assert.doesNotMatch(sql.replace(/^--.*$/gm, ''), /\b(?:DROP|TRUNCATE|DELETE|UPDATE|REPLACE)\b/i)
|
||||
})
|
||||
|
||||
test('commercial schemas do not invent container or palletizing facts for pool orders', () => {
|
||||
for (const name of ['ll_local_looseboard_order', 'll_us_truck_order']) {
|
||||
const definition = table(overseas, 'baiyue_lastleg', name)
|
||||
assert.match(definition, /container_type\s+varchar\(32\)(?:\s+COLLATE\s+\w+)?\s+(?:NULL\s+)?DEFAULT NULL/i)
|
||||
assert.doesNotMatch(definition, /container_type[^\n]*DEFAULT '40HQ'/i)
|
||||
}
|
||||
assert.match(table(overseas, 'baiyue_lastleg', 'll_local_looseboard_order'), /pallet_required\s+varchar\(8\)(?:\s+COLLATE\s+\w+)?\s+(?:NULL\s+)?DEFAULT NULL/i)
|
||||
const sql = read('deploy/sql/migrations/overseas/baiyue_lastleg/V12__preserve_unknown_pool_order_fields.sql')
|
||||
assert.equal((sql.match(/MODIFY COLUMN/g) || []).length, 3)
|
||||
assert.doesNotMatch(sql.replace(/^--.*$/gm, ''), /\b(?:DROP|TRUNCATE|DELETE|UPDATE|REPLACE)\b/i)
|
||||
})
|
||||
|
||||
test('pool permissions are independent of trip details and default only to the platform administrator', () => {
|
||||
const permissions = seedRows(cn, 'iam_permission').filter(row => String(row.permission_code).startsWith('platform:fleet:capacity-offer:'))
|
||||
assert.equal(permissions.length, 5)
|
||||
|
||||
Reference in New Issue
Block a user