mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-22 03:51:18 +00:00
test: tighten telegram dm pairing assertions
This commit is contained in:
parent
4dac591fcf
commit
7aff45e47f
1 changed files with 5 additions and 3 deletions
|
|
@ -158,13 +158,15 @@ describe("enforceTelegramDmAccess", () => {
|
|||
expect(firstCall?.[0]).toBe(42);
|
||||
const sentText = typeof firstCall?.[1] === "string" ? firstCall[1] : "";
|
||||
expect(sentText).toContain("Pairing code:");
|
||||
expect(firstCall?.[2]).toEqual(expect.objectContaining({ parse_mode: "HTML" }));
|
||||
expect(firstCall?.[2]).toEqual({ parse_mode: "HTML" });
|
||||
expect(logger.info).toHaveBeenCalledWith(
|
||||
expect.objectContaining({
|
||||
{
|
||||
chatId: "42",
|
||||
senderUserId: "12345",
|
||||
username: "tester",
|
||||
}),
|
||||
firstName: "Test",
|
||||
lastName: undefined,
|
||||
},
|
||||
"telegram pairing request",
|
||||
);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue