mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-10-04 02:04:06 +00:00
Co-authored-by: alejandrobailo <alejandrobailo94@gmail.com>
19 lines
522 B
TypeScript
19 lines
522 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
|
|
import { isRegistryEligible } from "./access";
|
|
describe("Registry access", () => {
|
|
it.each([
|
|
[true, true, true, true],
|
|
[false, true, true, false],
|
|
[true, false, true, false],
|
|
[true, true, false, false],
|
|
[true, true, undefined, false],
|
|
[true, true, "true", false],
|
|
])(
|
|
"allows only exact current authority",
|
|
(cloud, flag, permission, expected) => {
|
|
expect(isRegistryEligible(cloud, flag, permission)).toBe(expected);
|
|
},
|
|
);
|
|
});
|