test/test_helper.rb in pagarme-1.9.3 vs test/test_helper.rb in pagarme-1.9.4
- old
+ new
@@ -116,15 +116,17 @@
assert customer.name == 'Jose da Silva'
assert customer.born_at
assert customer.id
end
-def test_subscription_transaction_response(transaction)
+def test_subscription_transaction_response(transaction, amount = nil, installments = nil)
+ amount ||= 2000
+ installments ||= 1
assert transaction.id
assert !transaction.refuse_reason
assert transaction.date_created
- assert transaction.amount == 2000
- assert transaction.installments.to_i == 1
+ assert transaction.amount == amount
+ assert transaction.installments.to_i == installments
# assert transaction.card_brand == 'visa'
assert transaction.payment_method == 'credit_card'
assert transaction.status == 'paid'
assert !transaction.boleto_url
assert !transaction.boleto_barcode