a bit more testing

This commit is contained in:
Rimian Perkins 2020-01-10 16:47:28 +11:00
parent 7e2d4595ca
commit 9902947e99
2 changed files with 25 additions and 2 deletions

View File

@ -12,6 +12,10 @@ acceptance("Discourse Subscriptions", {
QUnit.test("subscribing", async assert => {
await visit("/s");
assert.ok($("#product-list").length, "has product page");
assert.ok($(".product:first-child a").length, "has a link");
await click(".product:first-child a");
assert.ok(
$(".discourse-subscriptions-section-columns").length,
"has a the sections for billing"
);
});

View File

@ -19,4 +19,23 @@ export default function(helpers) {
return response(products);
});
this.get("/s/products/:id", () => {
const product = {};
return response(product);
});
this.get("/s/plans", () => {
const plans = [
{
id: "plan_GHGHSHS8654G",
amount: 200,
currency: "usd",
interval: "month"
}
];
return response(plans);
});
}