tap/spec/factories/order_items.rb

18 lines
355 B
Ruby
Raw Normal View History

# == Schema Information
#
# Table name: order_items
#
# id :integer not null, primary key
# order_id :integer
# product_id :integer not null
2016-03-08 15:53:50 +01:00
# count :integer default(0)
#
FactoryGirl.define do
factory :order_item do
order
2015-09-04 16:47:49 +02:00
association :product, factory: :product
count { 1 + rand(5) }
end
end