test: remove low-value open-policy slash channel case

This commit is contained in:
Peter Steinberger
2026-02-16 09:15:18 +00:00
parent 22c53af604
commit d0b0ca9fcf

View File

@@ -335,25 +335,6 @@ describe("slack slash commands channel policy", () => {
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 () => {
harness.ctx.groupPolicy = "open";
harness.ctx.channelsConfig = { C_DENIED: { allow: false } };