From 86c77a739501b66babb9d5c6f4ba0528e9093977 Mon Sep 17 00:00:00 2001 From: Rimian Perkins Date: Fri, 1 Nov 2019 10:50:34 +1100 Subject: [PATCH] rubocop && fix i18n --- assets/javascripts/discourse/models/plan.js.es6 | 2 ++ config/locales/client.en.yml | 1 + spec/requests/plans_controller_spec.rb | 6 +++--- 3 files changed, 6 insertions(+), 3 deletions(-) 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