test: expand accountId routing coverage
Co-authored-by: adam91holt <adam91holt@users.noreply.github.com>
This commit is contained in:
@@ -42,6 +42,9 @@ describe("delivery context helpers", () => {
|
||||
"whatsapp|+1555|",
|
||||
);
|
||||
expect(deliveryContextKey({ channel: "whatsapp" })).toBeUndefined();
|
||||
expect(
|
||||
deliveryContextKey({ channel: "whatsapp", to: "+1555", accountId: "acct-1" }),
|
||||
).toBe("whatsapp|+1555|acct-1");
|
||||
});
|
||||
|
||||
it("derives delivery context from a session entry", () => {
|
||||
@@ -57,5 +60,16 @@ describe("delivery context helpers", () => {
|
||||
to: "+1777",
|
||||
accountId: "acct-9",
|
||||
});
|
||||
|
||||
expect(
|
||||
deliveryContextFromSession({
|
||||
channel: "telegram",
|
||||
lastTo: " 123 ",
|
||||
}),
|
||||
).toEqual({
|
||||
channel: "telegram",
|
||||
to: "123",
|
||||
accountId: undefined,
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user