mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-08-19 09:30:21 +00:00
test(ui): pin the exact OAuth scopes Prowler asks Slack for
This commit is contained in:
@@ -43,9 +43,9 @@ describe("starting the install", () => {
|
||||
expect(`${consentScreen.origin}${consentScreen.pathname}`).toBe(
|
||||
"https://slack.com/oauth/v2/authorize",
|
||||
);
|
||||
expect((consentScreen.searchParams.get("scope") ?? "").split(",")).toEqual(
|
||||
expect.arrayContaining(REQUIRED_SCOPES),
|
||||
);
|
||||
const scopes = (consentScreen.searchParams.get("scope") ?? "").split(",");
|
||||
expect(scopes).toHaveLength(REQUIRED_SCOPES.length);
|
||||
expect(scopes).toEqual(expect.arrayContaining(REQUIRED_SCOPES));
|
||||
// The state is server-minted, binding this install to the session
|
||||
// (design D5).
|
||||
expect(consentScreen.searchParams.get("state")).toBeTruthy();
|
||||
|
||||
Reference in New Issue
Block a user