only list active plans on the front end

This commit is contained in:
Rimian Perkins 2019-10-24 10:39:10 +11:00
parent 603ddc354b
commit 490c424bc0
2 changed files with 3 additions and 3 deletions

View File

@ -8,7 +8,7 @@ module DiscoursePatrons
def index
begin
plans = ::Stripe::Plan.list
plans = ::Stripe::Plan.list(active: true)
render_json_dump plans.data

View File

@ -5,8 +5,8 @@ require 'rails_helper'
module DiscoursePatrons
RSpec.describe PlansController do
describe "index" do
it "lists the plans" do
::Stripe::Plan.expects(:list)
it "lists the active plans" do
::Stripe::Plan.expects(:list).with(active: true)
get "/patrons/plans.json"
end
end