优化
This commit is contained in:
@@ -163,3 +163,10 @@ test('replay rejection cannot discard an earlier unknown creation outcome', asyn
|
||||
assert.deepEqual(calls[1], calls[0])
|
||||
} finally { harness.dispose() }
|
||||
})
|
||||
|
||||
test('purchase category is optional while its length remains bounded', () => {
|
||||
const payload = presentation.buildProcurementCreate({ ...draft(), purchaseCategory: ' ' }, 'Company', 'key')
|
||||
assert.equal(payload.purchaseCategory, '')
|
||||
assert.equal(submission.restoreProcurementSubmission(JSON.stringify(payload)).purchaseCategory, '')
|
||||
assert.throws(() => presentation.buildProcurementCreate({ ...draft(), purchaseCategory: 'x'.repeat(129) }, 'Company', 'key'), /品类/)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user