Sha256: 29fe124ebf3577623d3b77ee4ce6e7d91d10319fe6c71666631935d45acfaa8c

Contents?: true

Size: 634 Bytes

Versions: 6

Compression:

Stored size: 634 Bytes

Contents

FactoryGirl.define do
  factory :order, :class => Spree::Order do
    # associations:
    association(:user, :factory => :user)
    association(:bill_address, :factory => :address)
    completed_at nil
    bill_address_id nil
    ship_address_id nil
    email 'foo@example.com'
  end

  factory :order_with_totals, :parent => :order do
    after_create { |order| Factory(:line_item, :order => order) }
  end

  factory :order_with_inventory_unit_shipped, :parent => :order do
    after_create do |order|
      Factory(:line_item, :order => order)
      Factory(:inventory_unit, :order => order, :state => 'shipped')
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
spree_core-1.0.1 lib/spree/core/testing_support/factories/order_factory.rb
spree_core-1.0.0 lib/spree/core/testing_support/factories/order_factory.rb
spree_core-1.0.0.rc4 lib/spree/core/testing_support/factories/order_factory.rb
spree_core-1.0.0.rc3 lib/spree/core/testing_support/factories/order_factory.rb
spree_core-1.0.0.rc2 lib/spree/core/testing_support/factories/order_factory.rb
spree_core-1.0.0.rc1 lib/spree/core/testing_support/factories/order_factory.rb