Sha256: 7ea1969462c9da3bcdc0945131dde76a2da713b34864b1cc7ca4529d55dbb6a9
Contents?: true
Size: 1.02 KB
Versions: 3
Compression:
Stored size: 1.02 KB
Contents
require_relative '../../test_helper' module PagarMe class BankAccountTest < Test::Unit::TestCase should 'be able to create a bank_account' do bank_account = PagarMe::BankAccount.create bank_account_params assert_equal bank_account.bank_code, '237' end should 'be able to search by anything' do bank_account = PagarMe::BankAccount.create bank_account_params bank_accounts = PagarMe::BankAccount.find_by bank_code: '237' assert bank_accounts.size > 0 bank_accounts.each do |b| assert_equal b.bank_code, '237' end end { bank_code: 'foo', agencia: 'abcd', agencia_dv: 'Y', conta: 'ABCD', conta_dv: '', legal_name: '', document_number: 'foooo' }.each do |key, value| should "validate bank_account - #{key}" do exception = assert_raises(PagarMe::ValidationError){ BankAccount.create key => value } assert_has_error_param exception, key.to_s end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
pagarme-2.1.2 | test/pagarme/resources/bank_account_test.rb |
pagarme-2.1.1 | test/pagarme/resources/bank_account_test.rb |
pagarme-2.1.0 | test/pagarme/resources/bank_account_test.rb |