2014-12-04 19:50:02 +01:00
|
|
|
# == Schema Information
|
|
|
|
#
|
|
|
|
# Table name: orders
|
|
|
|
#
|
2015-03-19 16:22:55 +01:00
|
|
|
# id :integer not null, primary key
|
|
|
|
# user_id :integer
|
|
|
|
# price_cents :integer
|
|
|
|
# created_at :datetime not null
|
|
|
|
# updated_at :datetime not null
|
|
|
|
# cancelled :boolean default("f")
|
2014-12-04 19:50:02 +01:00
|
|
|
#
|
|
|
|
|
2015-09-02 20:33:35 +02:00
|
|
|
require 'faker'
|
|
|
|
|
|
|
|
FactoryGirl.define do
|
|
|
|
factory :order do
|
|
|
|
user
|
|
|
|
before(:create) do |order|
|
|
|
|
order.order_items << build(:order_item, order: order)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|