Add bank statement import test

This commit is contained in:
Alex Sherman 2020-03-03 11:15:52 +02:00
parent 0c30e8b8ee
commit 6655ac6354
2 changed files with 23 additions and 0 deletions

View file

@ -0,0 +1,7 @@
VV 000689NL85RABO74981124931508051533
VV 220150805 M NL85RABO7498112493EUR Algsaldo C 26397
VV 12015080520890321MK NL85RABO7498112493EUR401NL93ABNA8027105943 Registrar Second Prepayment Invoice no.3131071 C 72055
VV 12015080520890321MK NL85RABO7498112493EUR401NL93ABNA8027105943 eedirect Prepayment Invoice no. 13 C 480
VV 12015080521042372MK NL85RABO7498112493EUR767EE021222121767323770 Line Suva 8 Arve nr 2015-01 D 55000
VV 320150805 M NL85RABO7498112493EUR Lõppsaldo C 5417
VV 999 176980

View file

@ -0,0 +1,16 @@
require 'application_system_test_case'
class BankStatementTest < ApplicationSystemTestCase
setup do
sign_in users(:admin)
travel_to Time.zone.parse('2010-07-05 00:30:00')
end
def test_import_statement
assert_difference 'BankStatement.count', 1 do
visit import_admin_bank_statements_path
attach_file 'Th6 file', Rails.root.join('test', 'fixtures', 'files', 'bank_statement_test.txt').to_s
click_link_or_button 'Save'
end
end
end