Skip to content

Commit ec4e870

Browse files
authored
add sync_subscriptions to FakeProcessor::Customer (#1156)
1 parent c7d7a75 commit ec4e870

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

app/models/pay/fake_processor/customer.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ def subscribe(name: Pay.default_product_name, plan: Pay.default_plan_name, **opt
5555
subscriptions.create!(attributes)
5656
end
5757

58+
def sync_subscriptions(**options)
59+
[]
60+
end
61+
5862
def add_payment_method(payment_method_id, default: false)
5963
# Make to generate a processor_id
6064
api_record

test/pay/fake_processor/customer_test.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,12 @@ class Pay::FakeProcessor::CustomerTest < ActiveSupport::TestCase
6060
assert_equal "Fake", payment_method.brand
6161
end
6262

63+
test "fake processor sync_subscriptions" do
64+
assert_nothing_raised do
65+
@pay_customer.sync_subscriptions
66+
end
67+
end
68+
6369
test "generates fake processor_id" do
6470
user = users(:none)
6571
pay_customer = user.set_payment_processor :fake_processor, allow_fake: true

0 commit comments

Comments
 (0)