Some tests for invoice binding

This commit is contained in:
Martin Lensment 2015-04-14 19:00:38 +03:00
parent e678e655da
commit 57d23976c7
19 changed files with 206 additions and 25 deletions

View file

@ -0,0 +1,4 @@
Fabricator(:account) do
account_type { Account::CASH }
balance 0.0
end

View file

@ -0,0 +1,6 @@
Fabricator(:bank_statement) do
bank_code { '767' }
iban { 'EE557700771000598731' }
queried_at { Time.zone.now }
bank_transactions(count: 2)
end

View file

@ -0,0 +1,6 @@
Fabricator(:bank_transaction) do
currency { 'EUR' }
sum { 100.0 }
description { 'Invoice no. 1' }
reference_no { 'RF2405752128' }
end

View file

@ -7,6 +7,8 @@ Fabricator(:registrar) do
zip 'Postal'
email 'info@registrar1.ee'
country_code 'EE'
reference_no { sequence(:reference_no) { |i| "RF#{i}" } }
accounts(count: 1)
end
Fabricator(:registrar1, from: :registrar) do
@ -28,3 +30,17 @@ Fabricator(:registrar2, from: :registrar) do
zip 'Postal'
email 'info@registrar2.ee'
end
Fabricator(:eis, from: :registrar) do
name 'EIS'
reg_no '90010019'
phone '+372 727 1000'
country_code 'EE'
vat_no 'EE101286464'
email 'info@internet.ee'
state 'Harjumaa'
city 'Tallinn'
street 'Paldiski mnt 80'
zip '10617'
url 'www.internet.ee'
end