fix rubocop
This commit is contained in:
parent
608a778b05
commit
5153a9a634
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue