mirror of
https://github.com/discourse/discourse-subscriptions.git
synced 2025-03-07 01:59:35 +00:00
18 lines
406 B
Plaintext
18 lines
406 B
Plaintext
|
import Plan from "discourse/plugins/discourse-patrons/discourse/models/plan";
|
||
|
|
||
|
QUnit.module("discourse-patrons:model:plan");
|
||
|
|
||
|
QUnit.test("subscriptionRate", assert => {
|
||
|
const plan = Plan.create({
|
||
|
amount: 2399,
|
||
|
currency: 'aud',
|
||
|
interval: 'month'
|
||
|
});
|
||
|
|
||
|
assert.equal(
|
||
|
plan.get("subscriptionRate"),
|
||
|
"$23.99 AUD / month",
|
||
|
"it should return the formatted subscription rate"
|
||
|
);
|
||
|
});
|