diff --git a/assets/javascripts/discourse/templates/components/payment-options.hbs b/assets/javascripts/discourse/templates/components/payment-options.hbs
index 46ff10b..06a1388 100644
--- a/assets/javascripts/discourse/templates/components/payment-options.hbs
+++ b/assets/javascripts/discourse/templates/components/payment-options.hbs
@@ -17,8 +17,12 @@
actionParam=plan
class="btn btn-discourse-subscriptions-subscribe"
}}
-
Monthly
- AUD $5.00
+
+ {{plan.interval}}
+
+
+ {{format-currency plan.currency plan.amountDollars}}
+
{{/d-button}}
{{/each}}
diff --git a/test/javascripts/components/payment-options-test.js.es6 b/test/javascripts/components/payment-options-test.js.es6
index b8c79f8..88b9c0b 100644
--- a/test/javascripts/components/payment-options-test.js.es6
+++ b/test/javascripts/components/payment-options-test.js.es6
@@ -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"
+ );
}
});