This commit is contained in:
2026-10-20 11:54:44 +08:00
parent 5036593195
commit 8abc058a65
29 changed files with 445 additions and 78 deletions
@@ -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'), /品类/)
})