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(
|
expect(`${consentScreen.origin}${consentScreen.pathname}`).toBe(
|
||||||
"https://slack.com/oauth/v2/authorize",
|
"https://slack.com/oauth/v2/authorize",
|
||||||
);
|
);
|
||||||
expect((consentScreen.searchParams.get("scope") ?? "").split(",")).toEqual(
|
const scopes = (consentScreen.searchParams.get("scope") ?? "").split(",");
|
||||||
expect.arrayContaining(REQUIRED_SCOPES),
|
expect(scopes).toHaveLength(REQUIRED_SCOPES.length);
|
||||||
);
|
expect(scopes).toEqual(expect.arrayContaining(REQUIRED_SCOPES));
|
||||||
// The state is server-minted, binding this install to the session
|
// The state is server-minted, binding this install to the session
|
||||||
// (design D5).
|
// (design D5).
|
||||||
expect(consentScreen.searchParams.get("state")).toBeTruthy();
|
expect(consentScreen.searchParams.get("state")).toBeTruthy();
|
||||||
|
|||||||
Reference in New Issue
Block a user