Add fixtures

This commit is contained in:
Artur Beljajev 2017-11-09 15:24:04 +02:00
parent 88ac207913
commit 6cd7a685f9
4 changed files with 44 additions and 0 deletions

7
test/fixtures/account_activities.yml vendored Normal file
View file

@ -0,0 +1,7 @@
DEFAULTS: &DEFAULTS
account_id: 1
one:
<<: *DEFAULTS
invoice: paid
bank_transaction: one

3
test/fixtures/bank_transactions.yml vendored Normal file
View file

@ -0,0 +1,3 @@
one:
sum: 1
currency: EUR

32
test/fixtures/invoices.yml vendored Normal file
View file

@ -0,0 +1,32 @@
DEFAULTS: &DEFAULTS
created_at: <%= Time.zone.parse '2010-07-05' %>
due_date: <%= Time.zone.parse '2010-08-05' %>
currency: EUR
seller_name: John Doe
seller_iban: 1234
buyer_name: Jane Doe
vat_rate: 1
valid:
<<: *DEFAULTS
exported:
<<: *DEFAULTS
exported: true
cancelled:
<<: *DEFAULTS
cancelled_at: 2010-07-05
paid:
<<: *DEFAULTS
sum_cache: 1
outstanding:
<<: *DEFAULTS
due_date: <%= Time.zone.parse '2010-07-06' %>
overdue:
<<: *DEFAULTS
due_date: <%= Time.zone.parse '2010-07-05' %>

View file

@ -6,6 +6,8 @@ require 'capybara/minitest'
class ActiveSupport::TestCase class ActiveSupport::TestCase
include FactoryBot::Syntax::Methods include FactoryBot::Syntax::Methods
fixtures :all
end end
class ActionDispatch::IntegrationTest class ActionDispatch::IntegrationTest