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