8792a8d0ca
Co-authored-by: ayattara <alassane.yattara@savoirfairelinux.com> Co-authored-by: Carlos Florencio <carlosmflorencio@gmail.com>
18 lines
544 B
TypeScript
18 lines
544 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
import { isPublicWebhook } from "./plugin-manifest-model";
|
|
|
|
describe("isPublicWebhook", () => {
|
|
it("preserves the v1 public default", () => {
|
|
expect(isPublicWebhook(1, undefined)).toBe(true);
|
|
});
|
|
|
|
it("uses the v2 authenticated default", () => {
|
|
expect(isPublicWebhook(2, undefined)).toBe(false);
|
|
});
|
|
|
|
it("honors explicit access in every version", () => {
|
|
expect(isPublicWebhook(1, "authenticated")).toBe(false);
|
|
expect(isPublicWebhook(2, "public")).toBe(true);
|
|
});
|
|
});
|