Sha256: d85d16fe403be720e036f1a1e5f8e4b691de38412c4041eaf40984fe8bd17d94

Contents?: true

Size: 994 Bytes

Versions: 2

Compression:

Stored size: 994 Bytes

Contents

require 'helper'

class TestMt940Abnamro < Test::Unit::TestCase

  def setup
    file_name = File.dirname(__FILE__) + '/fixtures/abnamro.txt'
    @transactions = MT940::Base.transactions(file_name)
    @transaction = @transactions.first
  end
  
  should 'have the correct number of transactions' do
    assert_equal 10, @transactions.size
  end

  context 'Transaction' do
    should 'have a bank_account' do
      assert_equal '517852257', @transaction.bank_account
    end

    should 'have an amount' do
      assert_equal -9.00, @transaction.amount
    end

    should 'have a description' do
      assert_equal 'GIRO   428428 KPN - DIGITENNE    BETALINGSKENM.  000000042188659 5314606715                       BETREFT FACTUUR D.D. 20-05-2011 INCL. 1,44 BTW', @transaction.description
    end

    should 'have a date' do
      assert_equal Date.new(2011,5,24), @transaction.date
    end

    should 'return its bank' do
      assert_equal 'Abnamro', @transaction.bank
    end

  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
mt940-0.5.1 test/test_mt940_abnamro.rb
mt940-0.5.0 test/test_mt940_abnamro.rb