Sha256: 5c8226ffe0343aec810e0ea032814311373d2337e8c8aa64a8ef1e232e61be61

Contents?: true

Size: 744 Bytes

Versions: 6

Compression:

Stored size: 744 Bytes

Contents

FactoryGirl.define do
  factory :invoice_bar_invoice_template, class: InvoiceBar::InvoiceTemplate do
    name { generate :invoice_bar_name }
    
    user { FactoryGirl.create(:invoice_bar_user) }
    account { FactoryGirl.create(:invoice_bar_account) }
  end
  
  factory :invoice_bar_filled_invoice_template, class: InvoiceBar::InvoiceTemplate do
    issue_date { Date.yesterday }
    due_date { issue_date + 28.days }
    contact_name 'Company'
    contact_ic 1029392
    contact_dic 'CZ898989'
    address { FactoryGirl.build(:invoice_bar_address) }
    amount 1000000

    user { FactoryGirl.create(:invoice_bar_user) }
    account { FactoryGirl.create(:invoice_bar_account) }
    items { [FactoryGirl.build(:invoice_bar_item)] }
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
invoice_bar-0.0.6 test/factories/invoice_bar_invoice_template.rb
invoice_bar-0.0.5 test/factories/invoice_bar_invoice_template.rb
invoice_bar-0.0.4 test/factories/invoice_bar_invoice_template.rb
invoice_bar-0.0.3 test/factories/invoice_bar_invoice_template.rb
invoice_bar-0.0.2 test/factories/invoice_bar_invoice_template.rb
invoice_bar-0.0.1 test/factories/invoice_bar_invoice_template.rb