Test #1
@@ -4254,7 +4254,7 @@ BEGIN
|
||||
AND aggregate_version=0 AND last_event_id='baseline-platform-admin-authorization-v0'
|
||||
AND (JSON_LENGTH(roles_json) <> 1
|
||||
OR NOT JSON_CONTAINS(roles_json, JSON_QUOTE('PLATFORM_ADMIN'))
|
||||
OR JSON_LENGTH(authorities_json) <> 105
|
||||
OR JSON_LENGTH(authorities_json) <> 106
|
||||
OR NOT JSON_CONTAINS(authorities_json, JSON_QUOTE('platform:overseas-warehouse:last-mile-order:list'))
|
||||
OR NOT JSON_CONTAINS(authorities_json, JSON_QUOTE('platform:overseas-warehouse:inbound-order:list'))
|
||||
OR NOT JSON_CONTAINS(authorities_json, JSON_QUOTE('platform:overseas-warehouse:dispatch:list'))
|
||||
|
||||
@@ -114,6 +114,8 @@ test('海外空库基线为固定平台管理员提供完整version0授权投影
|
||||
'platform:overseas-warehouse:product:edit',
|
||||
])
|
||||
assert.equal(authorities.length, 106)
|
||||
assert.ok(overseasSql.includes(`JSON_LENGTH(authorities_json) <> ${authorities.length}`),
|
||||
'fixed-admin SQL assertion must match the complete authority snapshot')
|
||||
assert.equal(new Set(authorities).size, authorities.length, 'baseline authorities must not contain duplicates')
|
||||
assert.equal(authorities.filter((item) => item.startsWith('platform:finance:')).length, 34)
|
||||
assert.equal(authorities.filter((item) => item.startsWith('platform:overseas-business:')).length, 11)
|
||||
|
||||
Reference in New Issue
Block a user