mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-07 22:11:23 +00:00
test: remove redundant explicit-deny slash policy case
This commit is contained in:
@@ -318,26 +318,6 @@ describe("slack slash commands channel policy", () => {
|
|||||||
resetPolicyHarness(harness);
|
resetPolicyHarness(harness);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("blocks explicitly denied channels when groupPolicy is open", async () => {
|
|
||||||
harness.ctx.groupPolicy = "open";
|
|
||||||
harness.ctx.channelsConfig = { C_DENIED: { allow: false } };
|
|
||||||
harness.ctx.resolveChannelName = async () => ({ name: "denied", type: "channel" });
|
|
||||||
|
|
||||||
const { respond } = await runSlashHandler({
|
|
||||||
commands: harness.commands,
|
|
||||||
command: {
|
|
||||||
channel_id: "C_DENIED",
|
|
||||||
channel_name: "denied",
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
expect(dispatchMock).not.toHaveBeenCalled();
|
|
||||||
expect(respond).toHaveBeenCalledWith({
|
|
||||||
text: "This channel is not allowed.",
|
|
||||||
response_type: "ephemeral",
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
it("blocks unlisted channels when groupPolicy is allowlist", async () => {
|
it("blocks unlisted channels when groupPolicy is allowlist", async () => {
|
||||||
harness.ctx.groupPolicy = "allowlist";
|
harness.ctx.groupPolicy = "allowlist";
|
||||||
harness.ctx.channelsConfig = { C_LISTED: { requireMention: true } };
|
harness.ctx.channelsConfig = { C_LISTED: { requireMention: true } };
|
||||||
|
|||||||
Reference in New Issue
Block a user