feat: 选票自动生成报销明细并支持集中分类(08-29-reimbursement-expense-policy-invoice-guard)
这个提交包含在:
@@ -337,6 +337,18 @@ async function buildApp({
|
||||
}
|
||||
|
||||
describe("GET /api/reimbursements/:id detail enhancements", () => {
|
||||
it("reads a saved unclassified draft without inventing an expense type", async () => {
|
||||
const record = buildReimbursementRecord({ status: "draft", workflow_instances: [] });
|
||||
record.items[0].expense_type_id = null;
|
||||
record.items[0].expense_type = null;
|
||||
const { app } = await buildApp({ reimbursement: record, latestWorkflowInstance: null });
|
||||
try {
|
||||
const response = await app.inject({ method: "GET", url: `/api/reimbursements/${REIMBURSEMENT_ID}`, headers: { authorization: "Bearer test" } });
|
||||
expect(response.statusCode, response.body).toBe(200);
|
||||
expect(response.json().data.items[0]).toMatchObject({ expenseTypeId: null, expenseType: null, amount: "188.80" });
|
||||
} finally { await app.close(); }
|
||||
});
|
||||
|
||||
it("allows an assigned workflow reviewer to read evidence without expense view permissions", async () => {
|
||||
const { app, prisma } = await buildApp({
|
||||
employeeId: "99999999-9999-4999-8999-999999999999",
|
||||
|
||||
在新工单中引用
屏蔽一个用户