mirror of
https://github.com/internetee/registry.git
synced 2025-07-24 03:30:33 +02:00
Some tests for invoice binding
This commit is contained in:
parent
e678e655da
commit
57d23976c7
19 changed files with 206 additions and 25 deletions
4
spec/fabricators/account_fabricator.rb
Normal file
4
spec/fabricators/account_fabricator.rb
Normal file
|
@ -0,0 +1,4 @@
|
|||
Fabricator(:account) do
|
||||
account_type { Account::CASH }
|
||||
balance 0.0
|
||||
end
|
6
spec/fabricators/bank_statement_fabricator.rb
Normal file
6
spec/fabricators/bank_statement_fabricator.rb
Normal file
|
@ -0,0 +1,6 @@
|
|||
Fabricator(:bank_statement) do
|
||||
bank_code { '767' }
|
||||
iban { 'EE557700771000598731' }
|
||||
queried_at { Time.zone.now }
|
||||
bank_transactions(count: 2)
|
||||
end
|
6
spec/fabricators/bank_transaction_fabricator.rb
Normal file
6
spec/fabricators/bank_transaction_fabricator.rb
Normal file
|
@ -0,0 +1,6 @@
|
|||
Fabricator(:bank_transaction) do
|
||||
currency { 'EUR' }
|
||||
sum { 100.0 }
|
||||
description { 'Invoice no. 1' }
|
||||
reference_no { 'RF2405752128' }
|
||||
end
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue