test/pagarme/resources/subscription_test.rb in pagarme-2.1.4 vs test/pagarme/resources/subscription_test.rb in pagarme-2.2.0
- old
+ new
@@ -94,7 +94,16 @@
assert_equal subscription.status, 'trialing'
subscription.cancel
assert_equal subscription.status, 'canceled'
end
+
+ should 'be able to settle_charge a subscription' do
+ plan = PagarMe::Plan.create no_trial_plan_params
+ subscription = PagarMe::Subscription.create boleto_with_customer_params(plan: plan)
+ assert_equal subscription.status, 'unpaid'
+
+ subscription.settle_charge
+ assert_equal subscription.status, 'paid'
+ end
end
end