fix rubocop

This commit is contained in:
Rimian Perkins 2019-11-12 12:56:35 +11:00
parent 608a778b05
commit 5153a9a634
1 changed files with 2 additions and 2 deletions

View File

@ -63,13 +63,13 @@ module DiscoursePatrons
let!(:customer) { Fabricate(:customer, customer_id: 'cus_tmp76543g', user_id: user.id) }
it "does not delete a subscription" do
::Stripe::Subscription.expects(:retrieve).with('sub_12345').returns({ customer: 'other' })
::Stripe::Subscription.expects(:retrieve).with('sub_12345').returns(customer: 'other')
::Stripe::Subscription.expects(:delete).never
delete "/patrons/user/subscriptions/sub_12345.json"
end
it "deletes a subscription" do
::Stripe::Subscription.expects(:retrieve).with('sub_12345').returns({ customer: 'cus_tmp76543g' })
::Stripe::Subscription.expects(:retrieve).with('sub_12345').returns(customer: 'cus_tmp76543g')
::Stripe::Subscription.expects(:delete).with('sub_12345')
delete "/patrons/user/subscriptions/sub_12345.json"
end