product pretender
This commit is contained in:
parent
d26a60a3e8
commit
1734abc1b9
|
@ -3,21 +3,12 @@ import { acceptance } from "helpers/qunit-helpers";
|
||||||
acceptance("Discourse Patrons", {
|
acceptance("Discourse Patrons", {
|
||||||
settings: {
|
settings: {
|
||||||
discourse_patrons_subscription_group: "plan-id"
|
discourse_patrons_subscription_group: "plan-id"
|
||||||
}
|
},
|
||||||
|
loggedIn: true
|
||||||
});
|
});
|
||||||
|
|
||||||
// TODO: add request fixtures
|
QUnit.test("subscribing", async assert => {
|
||||||
|
|
||||||
QUnit.skip("subscribing", async assert => {
|
|
||||||
await visit("/patrons/subscribe");
|
await visit("/patrons/subscribe");
|
||||||
|
|
||||||
assert.ok($("h3").length, "has a heading");
|
assert.ok($("h3").length, "has a heading");
|
||||||
});
|
});
|
||||||
|
|
||||||
QUnit.skip("subscribing with empty customer", async assert => {
|
|
||||||
await visit("/patrons/subscribe");
|
|
||||||
assert.ok(
|
|
||||||
$(".discourse-patrons-subscribe-customer-empty").length,
|
|
||||||
"has empty customer content"
|
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
export default function(helpers) {
|
||||||
|
const { response } = helpers;
|
||||||
|
|
||||||
|
this.get("/patrons/products", () => {
|
||||||
|
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);
|
||||||
|
});
|
||||||
|
}
|
Loading…
Reference in New Issue