test/pagarme/transaction.rb in pagarme-1.9 vs test/pagarme/transaction.rb in pagarme-1.9.1
- old
+ new
@@ -9,9 +9,24 @@
transaction.charge
assert transaction.status == 'paid'
test_transaction_response(transaction)
end
+ should 'be able to simulate a boleto payment' do
+ transaction = PagarMe::Transaction.new({
+ :payment_method => "boleto",
+ :amount => "1000"
+ })
+ transaction.charge
+
+ assert transaction.status == 'waiting_payment'
+
+ transaction.status = 'paid'
+ transaction.save
+
+ assert transaction.status == 'paid'
+ end
+
should 'be able to refund' do
transaction = test_transaction
transaction.charge
test_transaction_response(transaction)
transaction.refund