only list active plans on the front end
This commit is contained in:
parent
603ddc354b
commit
490c424bc0
|
@ -8,7 +8,7 @@ module DiscoursePatrons
|
||||||
|
|
||||||
def index
|
def index
|
||||||
begin
|
begin
|
||||||
plans = ::Stripe::Plan.list
|
plans = ::Stripe::Plan.list(active: true)
|
||||||
|
|
||||||
render_json_dump plans.data
|
render_json_dump plans.data
|
||||||
|
|
||||||
|
|
|
@ -5,8 +5,8 @@ require 'rails_helper'
|
||||||
module DiscoursePatrons
|
module DiscoursePatrons
|
||||||
RSpec.describe PlansController do
|
RSpec.describe PlansController do
|
||||||
describe "index" do
|
describe "index" do
|
||||||
it "lists the plans" do
|
it "lists the active plans" do
|
||||||
::Stripe::Plan.expects(:list)
|
::Stripe::Plan.expects(:list).with(active: true)
|
||||||
get "/patrons/plans.json"
|
get "/patrons/plans.json"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue