clarion/spec/factories/events.rb
2019-04-28 01:25:13 +03:00

18 lines
466 B
Ruby

FactoryBot.define do
factory :event do
title { |n| "Event #{n}" }
length { 60 }
abstract { 'foo' }
description { 'foo' }
conference
language { :bg }
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
end
end