1
0
mirror of synced 2026-08-07 07:36:56 +00:00
Files
spirobel 411ac6ec80 DEV: add frontend tests to make sure pricing-table works
We test three conditions:
1. Make sure the customer email is prefilled, if there is a logged in discourse user
2. The pricing table also displays, if there is no logged in discourse user
3. If the pricing table is not configured, the pricing table element does not show up.
2024-04-23 15:32:19 -06:00

42 lines
1.1 KiB
JavaScript

export default function (helpers) {
const { response } = helpers;
this.get("/subscriptions", () => {
const products = [
{
id: "prod_23o8I7tU4g56",
name: "Awesome Product",
description:
"Subscribe to our awesome product. For only $230.10 per month, you can get access. This is a test site. No real credit card transactions.",
},
{
id: "prod_B23dc9I7tU4eCy",
name: "Special Product",
description:
"This is another subscription product. You can have more than one. From $12 per month.",
},
];
return response(products);
});
this.get("/subscriptions/:id", () => {
const product = {
id: "prod_23o8I7tU4g56",
name: "Awesome Product",
description:
"Subscribe to our awesome product. For only $230.10 per month, you can get access. This is a test site. No real credit card transactions.",
};
const plans = [
{
id: "plan_GHGHSHS8654G",
amount: 200,
currency: "usd",
interval: "month",
},
];
return response({ product, plans });
});
}