Files
formbricks/apps/web/modules/gateway-auth/lib/service.test.ts
T
2026-05-05 13:28:08 +04:00

14 lines
590 B
TypeScript

import { describe, expect, test } from "vitest";
import { ZGatewayAuthService, getGatewayAuthServiceTokenPurpose } from "./service";
describe("gateway auth service registry", () => {
test("returns the configured token purpose for feedbackRecords", () => {
expect(getGatewayAuthServiceTokenPurpose("feedbackRecords")).toBe("feedback_records_gateway");
});
test("validates supported gateway auth services", () => {
expect(ZGatewayAuthService.parse("feedbackRecords")).toBe("feedbackRecords");
expect(() => ZGatewayAuthService.parse("unknownService")).toThrow();
});
});