mirror of
https://github.com/moltbot/moltbot.git
synced 2026-05-13 15:47:28 +00:00
test: verify plugin warning messages
This commit is contained in:
@@ -123,16 +123,23 @@ describe("irc inbound behavior", () => {
|
||||
expect(sendReply).toHaveBeenCalledTimes(1);
|
||||
expect(sendReply).toHaveBeenCalledWith(
|
||||
"alice",
|
||||
expect.stringContaining("OpenClaw: access not configured."),
|
||||
[
|
||||
"OpenClaw: access not configured.",
|
||||
"",
|
||||
"Your IRC id: alice!ident@example.com",
|
||||
"Pairing code:",
|
||||
"```",
|
||||
"CODE",
|
||||
"```",
|
||||
"",
|
||||
"Ask the bot owner to approve with:",
|
||||
"openclaw pairing approve irc CODE",
|
||||
"```",
|
||||
"openclaw pairing approve irc CODE",
|
||||
"```",
|
||||
].join("\n"),
|
||||
undefined,
|
||||
);
|
||||
expect(sendReply).toHaveBeenCalledWith(
|
||||
"alice",
|
||||
expect.stringContaining("Your IRC id: alice!ident@example.com"),
|
||||
undefined,
|
||||
);
|
||||
const replyMessages = sendReply.mock.calls.map((call) => call[1]);
|
||||
expect(replyMessages.some((message) => message.includes("CODE"))).toBe(true);
|
||||
});
|
||||
|
||||
it("drops unauthorized group control commands before dispatch", async () => {
|
||||
|
||||
Reference in New Issue
Block a user