2014-04-30 14:48:20 +02:00
|
|
|
# Read about factories at https://github.com/thoughtbot/factory_girl
|
|
|
|
|
|
2014-04-09 01:32:47 +02:00
|
|
|
FactoryGirl.define do
|
|
|
|
|
factory :conference do
|
2014-04-27 17:52:39 +02:00
|
|
|
title 'The dog and pony show'
|
2014-05-19 12:49:04 +05:30
|
|
|
sequence(:short_title) { |n| "dps#{n}14" }
|
2014-04-27 17:52:39 +02:00
|
|
|
timezone 'Amsterdam'
|
2014-07-23 09:08:50 +02:00
|
|
|
start_date { Date.today }
|
|
|
|
|
end_date { 6.days.from_now }
|
2015-10-25 13:29:02 +02:00
|
|
|
program
|
|
|
|
|
|
2015-04-14 17:33:59 +02:00
|
|
|
factory :full_conference do
|
|
|
|
|
venue
|
|
|
|
|
splashpage
|
|
|
|
|
registration_period
|
|
|
|
|
|
|
|
|
|
after(:build) do |conference|
|
|
|
|
|
conference.commercials << build(:conference_commercial, commercialable: conference)
|
|
|
|
|
conference.campaigns << build(:campaign, conference: conference)
|
|
|
|
|
conference.targets << build(:target, conference: conference)
|
|
|
|
|
conference.questions << build(:question, conference_id: conference.id)
|
|
|
|
|
conference.lodgings << build(:lodging, conference: conference)
|
|
|
|
|
conference.sponsors << build(:sponsor, conference: conference)
|
|
|
|
|
conference.sponsorship_levels << build(:sponsorship_level, conference: conference)
|
|
|
|
|
conference.tickets << build(:ticket, conference: conference)
|
|
|
|
|
end
|
|
|
|
|
end
|
2014-04-09 01:32:47 +02:00
|
|
|
end
|
|
|
|
|
end
|