mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-12 19:01:11 +00:00
This commit is contained in:
@@ -43,29 +43,16 @@ describe("resolveCronDeliveryPlan", () => {
|
||||
expect(plan.requested).toBe(false);
|
||||
});
|
||||
|
||||
it("passes through accountId from delivery config", () => {
|
||||
it("resolves mode=none with requested=false and no channel (#21808)", () => {
|
||||
const plan = resolveCronDeliveryPlan(
|
||||
makeJob({
|
||||
delivery: {
|
||||
mode: "announce",
|
||||
channel: "telegram",
|
||||
to: "-1003816714067",
|
||||
accountId: "coordinator",
|
||||
},
|
||||
delivery: { mode: "none", to: "telegram:123" },
|
||||
}),
|
||||
);
|
||||
expect(plan.mode).toBe("announce");
|
||||
expect(plan.accountId).toBe("coordinator");
|
||||
expect(plan.to).toBe("-1003816714067");
|
||||
});
|
||||
|
||||
it("returns undefined accountId when not set", () => {
|
||||
const plan = resolveCronDeliveryPlan(
|
||||
makeJob({
|
||||
delivery: { mode: "announce", channel: "telegram", to: "123" },
|
||||
}),
|
||||
);
|
||||
expect(plan.accountId).toBeUndefined();
|
||||
expect(plan.mode).toBe("none");
|
||||
expect(plan.requested).toBe(false);
|
||||
expect(plan.channel).toBeUndefined();
|
||||
expect(plan.to).toBe("telegram:123");
|
||||
});
|
||||
|
||||
it("resolves webhook mode without channel routing", () => {
|
||||
|
||||
Reference in New Issue
Block a user