Sha256: b96fb14e5ff1445aeb85b8f61df4c5ea7ead59e96436da05ba933fea4692ca67

Contents?: true

Size: 922 Bytes

Versions: 1

Compression:

Stored size: 922 Bytes

Contents

require 'helper'

class TestMt940Rabobank < Test::Unit::TestCase

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

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

    should 'have a contra_account' do
      assert_equal 'P005675159', @transaction.contra_account
    end

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

    should 'have a contra_account_name' do
      assert_equal 'Uitgeverij De Druif', @transaction.contra_account_name
    end

    should 'have a description' do
      assert_equal 'Factuurnummer 234578', @transaction.description
    end
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mt940-0.2.0 test/test_mt940_rabobank.rb