1
0
mirror of synced 2026-05-22 18:53:16 +00:00

display the plan in the plan buttons

This commit is contained in:
Rimian Perkins
2019-12-09 10:30:34 +11:00
parent d3eed3546d
commit 71d6c6dab2
2 changed files with 20 additions and 3 deletions
@@ -20,7 +20,10 @@ componentTest("Discourse Subscriptions payment options has content", {
template: `{{payment-options plans=plans}}`,
async test(assert) {
this.set("plans", [1, 2]);
this.set("plans", [
{ currency: 'AUD', interval: 'year', amountDollars: "44.99" },
{ currency: 'GDP', interval: 'month', amountDollars: "9.99" },
]);
assert.equal(
find(".btn-discourse-subscriptions-subscribe").length,
@@ -32,6 +35,16 @@ componentTest("Discourse Subscriptions payment options has content", {
0,
"The none are selected"
);
assert.equal(
find(".btn-discourse-subscriptions-subscribe:first-child .interval").text().trim(),
"year",
"The plan interval is shown"
);
assert.equal(
find(".btn-discourse-subscriptions-subscribe:first-child .amount").text().trim(),
"$AUD 44.99",
"The plan amount and currency is shown"
);
}
});