feat(reimbursement-small-team-form-validation): 完善小团队报销填报校验
这个提交包含在:
@@ -131,6 +131,27 @@ describe("auth security configuration", () => {
|
||||
expect(() => getConfig()).toThrow(`Invalid ${name}`);
|
||||
});
|
||||
|
||||
it.each([
|
||||
[undefined, 365],
|
||||
["180", 180],
|
||||
["365", 365],
|
||||
])("accepts the configured reimbursement age policy", (value, expected) => {
|
||||
stubBaseEnv();
|
||||
vi.stubEnv("REIMBURSEMENT_MAX_AGE_DAYS", value);
|
||||
|
||||
expect(getConfig().reimbursementMaxAgeDays).toBe(expected);
|
||||
});
|
||||
|
||||
it.each(["0", "181", "366", "invalid"])(
|
||||
"rejects unsupported reimbursement age policy %s",
|
||||
(value) => {
|
||||
stubBaseEnv();
|
||||
vi.stubEnv("REIMBURSEMENT_MAX_AGE_DAYS", value);
|
||||
|
||||
expect(() => getConfig()).toThrow("Invalid REIMBURSEMENT_MAX_AGE_DAYS");
|
||||
},
|
||||
);
|
||||
|
||||
it("ignores a forged X-Forwarded-For header by default", async () => {
|
||||
stubBaseEnv();
|
||||
const app = await buildIpProbeApp();
|
||||
|
||||
在新工单中引用
屏蔽一个用户