diff --git a/assets/javascripts/discourse/models/plan.js.es6 b/assets/javascripts/discourse/models/plan.js.es6 index f0d2956..79a4d7a 100644 --- a/assets/javascripts/discourse/models/plan.js.es6 +++ b/assets/javascripts/discourse/models/plan.js.es6 @@ -17,6 +17,8 @@ const Plan = Discourse.Model.extend({ subscriptionRate(amountDollars, currency, interval) { return `$${amountDollars} ${currency.toUpperCase()} / ${interval}`; } + + }); Plan.reopenClass({ diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index 2d485fe..5db2140 100644 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -36,6 +36,7 @@ en: operations: destroy: confirm: Are you sure you want to cancel this subscription? + subscribe: title: Subscribe card: title: Payment diff --git a/spec/requests/plans_controller_spec.rb b/spec/requests/plans_controller_spec.rb index 3a11c0c..44d0d06 100644 --- a/spec/requests/plans_controller_spec.rb +++ b/spec/requests/plans_controller_spec.rb @@ -22,9 +22,9 @@ module DiscoursePatrons get "/patrons/plans.json" expect(JSON.parse(response.body)).to eq([ - { "amount" => 1000, "currency" => "aud", "id" => "plan_id678", "interval"=>"week" }, - { "amount" => 1220, "currency" => "aud", "id" => "plan_id123", "interval"=>"year" }, - { "amount" => 1399, "currency" => "usd", "id" => "plan_id234", "interval"=>"year" } + { "amount" => 1000, "currency" => "aud", "id" => "plan_id678", "interval" => "week" }, + { "amount" => 1220, "currency" => "aud", "id" => "plan_id123", "interval" => "year" }, + { "amount" => 1399, "currency" => "usd", "id" => "plan_id234", "interval" => "year" } ]) end end