From acc6b622893f5e3a7ec762e93b4d1d933c48be29 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Mon, 16 Feb 2026 09:32:38 +0000 Subject: [PATCH] test: remove low-value private-channel lookup slash edge case --- src/slack/monitor/slash.test.ts | 33 --------------------------------- 1 file changed, 33 deletions(-) diff --git a/src/slack/monitor/slash.test.ts b/src/slack/monitor/slash.test.ts index 8775c525cb7..f394208376d 100644 --- a/src/slack/monitor/slash.test.ts +++ b/src/slack/monitor/slash.test.ts @@ -308,36 +308,3 @@ describe("slack slash commands channel policy", () => { }); }); }); - -describe("slack slash commands access groups", () => { - let harness: ReturnType; - - beforeAll(async () => { - harness = createPolicyHarness(); - await registerCommands(harness.ctx, harness.account); - }); - - beforeEach(() => { - harness.postEphemeral.mockClear(); - resetPolicyHarness(harness); - }); - - it("enforces access-group gating when lookup fails for private channels", async () => { - harness.ctx.allowFrom = []; - harness.ctx.resolveChannelName = async () => ({}); - - const { respond } = await runSlashHandler({ - commands: harness.commands, - command: { - channel_id: "G123", - channel_name: "private", - }, - }); - - expect(dispatchMock).not.toHaveBeenCalled(); - expect(respond).toHaveBeenCalledWith({ - text: "You are not authorized to use this command.", - response_type: "ephemeral", - }); - }); -});