Sha256: 0e4fad0ebd90e67405a32d783eb75d6d3dd0fd9329f389d31447c209cf7dcdc7

Contents?: true

Size: 905 Bytes

Versions: 3

Compression:

Stored size: 905 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

  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
mt940-0.4.1 test/test_mt940_abnamro.rb
mt940-0.4.0 test/test_mt940_abnamro.rb
mt940-0.3.0 test/test_mt940_abnamro.rb