Sha256: e4dfa39555566564bc8df0315a5349dadb5594ecac97d1c9ab2ba0e64f3fab9a

Contents?: true

Size: 1.44 KB

Versions: 8

Compression:

Stored size: 1.44 KB

Contents

require_relative '../test/core_pro_test_base'
require_relative  '../lib/corepro/external_account'

class AcExternalAccountTest < CoreProTestBase
  def test_create
    ea = CorePro::ExternalAccount.new
    ea.customerId = @@exampleCustomerId
    ea.tag = "extact ruby #{@@timestamp}"
    ea.routingNumber = '123456789'
    ea.accountNumber = '987654321'
    ea.firstName = 'Edwin'
    ea.lastName = 'Awesome'
    ea.nickName = "Savings #{@@timestamp}"
    ea.type = 'Savings'
    ea.tag = "ext_acct_#{@@timestamp}"
    @@exampleExternalAccountId = ea.create @@exampleConn, nil
    puts "externalAccountId=#{@@exampleExternalAccountId}"
    assert @@exampleExternalAccountId > 0

  end

  def test_get
    puts "getting #{@@exampleExternalAccountId}..."
    ea = CorePro::ExternalAccount.get(@@exampleCustomerId, @@exampleExternalAccountId, @@exampleConn, nil)
    assert_equal 'COREPRO SANDBOX BANK', ea.name
  end

  def test_list
    externalAccounts = CorePro::ExternalAccount.list(@@exampleCustomerId, @@exampleConn, nil)
    assert_equal 1, externalAccounts.length, "Listed #{externalAccounts.length} external accounts for customerId=#{@@exampleCustomerId}"
  end

  def test_update
    ea = CorePro::ExternalAccount.get(@@exampleCustomerId, @@exampleExternalAccountId, @@exampleConn, nil)
    ea.nickName = "Updated external account #{@@timestamp}"
    externalAccountId = ea.update @@exampleConn, nil
    assert externalAccountId == @@exampleExternalAccountId
  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
corepro_fvr-1.0.9 test/ac_external_account_test.rb
corepro_eg-1.0.8 test/ac_external_account_test.rb
corepro_eg-1.0.7 test/ac_external_account_test.rb
corepro_eg-1.0.6 test/ac_external_account_test.rb
corepro_eg-1.0.5 test/ac_external_account_test.rb
corepro_eg-1.0.4 test/ac_external_account_test.rb
corepro_eg-1.0.3 test/ac_external_account_test.rb
corepro_eg-1.0.2 test/ac_external_account_test.rb