feat(api): add staff order detail and compliance eligibility
This commit is contained in:
@@ -349,6 +349,28 @@ test('POST /core/verifications creates async job and GET returns status', async
|
||||
assert.ok(['NEEDS_REVIEW', 'AUTO_PASS', 'AUTO_FAIL', 'ERROR'].includes(status.body.status));
|
||||
});
|
||||
|
||||
test('POST /core/verifications accepts tax_form verification jobs', async () => {
|
||||
const app = createApp();
|
||||
const created = await request(app)
|
||||
.post('/core/verifications')
|
||||
.set('Authorization', 'Bearer test-token')
|
||||
.send({
|
||||
type: 'tax_form',
|
||||
subjectType: 'worker',
|
||||
subjectId: 'document-tax-i9',
|
||||
fileUri: 'gs://krow-workforce-dev-private/uploads/test-user/i9.pdf',
|
||||
rules: { formType: 'I-9' },
|
||||
});
|
||||
|
||||
assert.equal(created.status, 202);
|
||||
assert.equal(created.body.type, 'tax_form');
|
||||
|
||||
const status = await waitForMachineStatus(app, created.body.verificationId);
|
||||
assert.equal(status.status, 200);
|
||||
assert.equal(status.body.type, 'tax_form');
|
||||
assert.ok(['NEEDS_REVIEW', 'AUTO_PASS', 'AUTO_FAIL', 'ERROR'].includes(status.body.status));
|
||||
});
|
||||
|
||||
test('POST /core/verifications rejects file paths not owned by actor', async () => {
|
||||
const app = createApp();
|
||||
const res = await request(app)
|
||||
|
||||
Reference in New Issue
Block a user