Skip to content

Commit 0fe495f

Browse files
committed
Assert policy-critical args in inline dispatch tests
1 parent d37bbf3 commit 0fe495f

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

‎src/auto-reply/reply/get-reply-inline-actions.skill-dispatch-policy.test.ts‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,12 @@ describe("handleInlineActions skill tool dispatch policy", () => {
123123
);
124124

125125
expect(result).toEqual({ kind: "reply", reply: { text: "❌ Tool not available: exec" } });
126+
expect(createOpenClawCodingToolsMock).toHaveBeenCalledWith(
127+
expect.objectContaining({
128+
senderIsOwner: false,
129+
config: { tools: { profile: "messaging" } },
130+
}),
131+
);
126132
expect(handleCommandsMock).not.toHaveBeenCalled();
127133
});
128134

@@ -149,6 +155,8 @@ describe("handleInlineActions skill tool dispatch policy", () => {
149155
expect(result).toEqual({ kind: "reply", reply: { text: "Hello World" } });
150156
expect(createOpenClawCodingToolsMock).toHaveBeenCalledWith(
151157
expect.objectContaining({
158+
senderIsOwner: false,
159+
config: { tools: { profile: "messaging" } },
152160
messageTo: "whatsapp:+18880001111",
153161
messageThreadId: "thread-42",
154162
}),

0 commit comments

Comments
 (0)