Sha256: 32dd7b22664b221e3c9f810e6feef09d15fd51772891def4f97f4dd8de642310

Contents?: true

Size: 870 Bytes

Versions: 3

Compression:

Stored size: 870 Bytes

Contents

require 'helper'

class TestMt940Ing < Test::Unit::TestCase

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

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

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

    should 'have a description' do
      assert_equal 'RC AFREKENING BETALINGSVERKEER BETREFT REKENING 4715589 PERIODE: 01-10-2010 / 31-12-2010 ING Bank N.V. tarifering ING', @transaction.description
    end

    should 'have a date' do
      assert_equal Date.new(2010,7,22), @transaction.date
    end
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

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