mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 13:54:30 +00:00
test: remove low-value open-policy slash channel case
This commit is contained in:
@@ -335,25 +335,6 @@ describe("slack slash commands channel policy", () => {
|
|||||||
resetPolicyHarness(harness);
|
resetPolicyHarness(harness);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("allows unlisted channels when groupPolicy is open", async () => {
|
|
||||||
harness.ctx.groupPolicy = "open";
|
|
||||||
harness.ctx.channelsConfig = { C_LISTED: { requireMention: true } };
|
|
||||||
harness.ctx.resolveChannelName = async () => ({ name: "unlisted", type: "channel" });
|
|
||||||
|
|
||||||
const { respond } = await runSlashHandler({
|
|
||||||
commands: harness.commands,
|
|
||||||
command: {
|
|
||||||
channel_id: "C_UNLISTED",
|
|
||||||
channel_name: "unlisted",
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
expect(dispatchMock).toHaveBeenCalledTimes(1);
|
|
||||||
expect(respond).not.toHaveBeenCalledWith(
|
|
||||||
expect.objectContaining({ text: "This channel is not allowed." }),
|
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
it("blocks explicitly denied channels when groupPolicy is open", async () => {
|
it("blocks explicitly denied channels when groupPolicy is open", async () => {
|
||||||
harness.ctx.groupPolicy = "open";
|
harness.ctx.groupPolicy = "open";
|
||||||
harness.ctx.channelsConfig = { C_DENIED: { allow: false } };
|
harness.ctx.channelsConfig = { C_DENIED: { allow: false } };
|
||||||
|
|||||||
Reference in New Issue
Block a user