Sha256: b19aaa06ae73cdc83637c63b94534522304eab9c1801349543cf6b6234b3ee0b

Contents?: true

Size: 799 Bytes

Versions: 5

Compression:

Stored size: 799 Bytes

Contents

FactoryGirl.define do
  factory :billet_payment_method, class: Spree::PaymentMethod::Billet do
    name 'Billet'
    created_at Date.today
  end

  factory :billet, class: Spree::Billet do
    created_at Date.today
    status 'pending'
    amount 10.0
    paid_in nil
    document_number 1
    order
    payment_method FactoryGirl.build(:billet_payment_method)
    user

    factory :billet_overdue do
      created_at (Date.today - 10.days)
    end
  end

  factory :billet_payment, class: Spree::Payment do
    amount 15.99
    association(:payment_method, factory: :billet_payment_method)
    association(:source, factory: :billet)
    order
    state 'checkout'
    response_code '1'

    factory :billet_payment_overdue do
      association(:source, factory: :billet_overdue)
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
spree_zaez_billet-3.0.4.1 lib/spree_zaez_billet/factories.rb
spree_zaez_billet-3.0.4 lib/spree_zaez_billet/factories.rb
spree_zaez_billet-3.0.3 lib/spree_zaez_billet/factories.rb
spree_zaez_billet-3.0.2 lib/spree_zaez_billet/factories.rb
spree_zaez_billet-3.0.1 lib/spree_zaez_billet/factories.rb