2014-12-04 19:50:02 +01:00
|
|
|
# == Schema Information
|
|
|
|
#
|
2015-03-19 16:22:55 +01:00
|
|
|
# Table name: order_items
|
2014-12-04 19:50:02 +01:00
|
|
|
#
|
|
|
|
# id :integer not null, primary key
|
|
|
|
# order_id :integer
|
2015-03-19 16:22:55 +01:00
|
|
|
# product_id :integer not null
|
|
|
|
# count :integer default("0")
|
2014-12-04 19:50:02 +01:00
|
|
|
#
|
|
|
|
|
2015-09-02 20:33:35 +02:00
|
|
|
FactoryGirl.define do
|
|
|
|
factory :order_item do
|
|
|
|
order
|
2015-09-04 16:47:49 +02:00
|
|
|
association :product, factory: :product
|
|
|
|
count { 1 + rand(5) }
|
2015-09-02 20:33:35 +02:00
|
|
|
end
|
|
|
|
end
|