Introduce Program to include cfp/rooms/tracks/events/event_types/difficulty_levels
This commit is contained in:
parent
028b82fda8
commit
444356fbc7
117 changed files with 1812 additions and 905 deletions
|
|
@ -3,7 +3,7 @@
|
|||
FactoryGirl.define do
|
||||
factory :event do
|
||||
sequence(:title) { |n| "The ##{n} talk you'll ever attend." }
|
||||
conference
|
||||
program
|
||||
abstract <<-EOS
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer ante
|
||||
lacus, mollis non urna vitae, varius semper leo. Nulla ac nibh dui. Mauris
|
||||
|
|
@ -35,7 +35,7 @@ FactoryGirl.define do
|
|||
# set an event_type if none is passed to the factory.
|
||||
# needs to be created here because otherwise it doesn't belong to the
|
||||
# same conference as the event
|
||||
event.event_type ||= build(:event_type, conference: event.conference)
|
||||
event.event_type ||= build(:event_type, program: event.program)
|
||||
end
|
||||
|
||||
factory :event_full do
|
||||
|
|
@ -44,9 +44,9 @@ FactoryGirl.define do
|
|||
room
|
||||
after(:build) do |event|
|
||||
event.commercials << build(:event_commercial, commercialable: event)
|
||||
event.difficulty_level = build(:difficulty_level, conference: event.conference)
|
||||
event.track = build(:track, conference: event.conference)
|
||||
event.room = build(:room, conference: event.conference)
|
||||
event.difficulty_level = build(:difficulty_level, program: event.program)
|
||||
event.track = build(:track, program: event.program)
|
||||
event.room = build(:room, program: event.program)
|
||||
event.comment_threads << build(:comment, commentable: event)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue