2019-04-28 01:25:13 +03:00
|
|
|
FactoryBot.define do
|
2015-04-17 02:01:28 +03:00
|
|
|
factory :event do
|
|
|
|
title { |n| "Event #{n}" }
|
|
|
|
length { 60 }
|
|
|
|
abstract { 'foo' }
|
|
|
|
description { 'foo' }
|
2019-01-08 00:36:25 +02:00
|
|
|
conference
|
2019-04-28 01:25:13 +03:00
|
|
|
language { :bg }
|
2019-01-08 00:36:25 +02:00
|
|
|
after(:build) do |event, evaluator|
|
|
|
|
evaluator.conference.tracks << create(:track)
|
|
|
|
event.track = evaluator.conference.tracks.first
|
|
|
|
|
|
|
|
evaluator.conference.event_types << create(:event_type)
|
|
|
|
event.event_type = evaluator.conference.event_types.first
|
|
|
|
end
|
2015-04-17 02:01:28 +03:00
|
|
|
end
|
|
|
|
end
|