18 lines
800 B
TypeScript
18 lines
800 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
|
|
import plans from "~/application/pricing/plans.server";
|
|
import { PricingModel } from "~/application/enums/subscriptions/PricingModel";
|
|
import { HIVEGRID_SUBSCRIPTION_PRICING_MODELS, isHiveGridSubscriptionPricingModel } from "./pricingModelPolicy";
|
|
|
|
describe("HiveGrid subscription pricing model policy", () => {
|
|
it("does not allow seat-type pricing models", () => {
|
|
expect(HIVEGRID_SUBSCRIPTION_PRICING_MODELS).not.toContain(PricingModel.PER_SEAT);
|
|
expect(isHiveGridSubscriptionPricingModel(PricingModel.PER_SEAT)).toBe(false);
|
|
});
|
|
|
|
it("keeps generated admin pricing seeds free of seat-type plans", () => {
|
|
expect(plans).not.toHaveLength(0);
|
|
expect(plans.map((plan) => plan.model)).not.toContain(PricingModel.PER_SEAT);
|
|
});
|
|
});
|