mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-10-22 03:14:21 +00:00
29 lines
710 B
TypeScript
29 lines
710 B
TypeScript
import { render, screen } from "@testing-library/react";
|
|
import { afterEach, describe, expect, it, vi } from "vitest";
|
|
|
|
import { AwsMethodSelector } from "./aws-method-selector";
|
|
|
|
describe("AwsMethodSelector", () => {
|
|
afterEach(() => {
|
|
vi.unstubAllEnvs();
|
|
});
|
|
|
|
it("links the OSS AWS Organizations badge to pricing", () => {
|
|
// Given
|
|
vi.stubEnv("NEXT_PUBLIC_IS_CLOUD_ENV", "false");
|
|
|
|
// When
|
|
render(
|
|
<AwsMethodSelector
|
|
onSelectSingle={vi.fn()}
|
|
onSelectOrganizations={vi.fn()}
|
|
/>,
|
|
);
|
|
|
|
// Then
|
|
expect(
|
|
screen.getByRole("link", { name: /available in prowler cloud/i }),
|
|
).toHaveAttribute("href", "https://prowler.com/pricing");
|
|
});
|
|
});
|