test/pagarme/resources/transaction_test.rb in pagarme-2.2.0 vs test/pagarme/resources/transaction_test.rb in pagarme-2.2.1

- old
+ new

@@ -136,13 +136,12 @@ assert_equal transaction.paid_amount, 1000 assert_equal transaction.refunded_amount, 0 end should 'validate transaction with invalid card_number' do - exception = assert_raises PagarMe::ValidationError do - PagarMe::Transaction.charge transaction_with_card_params(card_number: '123456') - end - assert exception.errors.any?{ |error| error.parameter_name == 'card_number' } + transaction = PagarMe::Transaction.new transaction_with_customer_with_invalid_card_number_params + transaction.charge + assert_equal transaction.status, 'refused' end should 'validate transaction missing card_holder_name' do exception = assert_raises PagarMe::ValidationError do params = {