tap/spec/factories/order_items.rb

18 lines
357 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
# 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