Rooms belong to venue

This commit is contained in:
Stella Rouzi 2015-11-07 11:43:36 +02:00 committed by Henne Vogelsang
parent feabbfbc99
commit f840f2b3f0
31 changed files with 221 additions and 166 deletions

View file

@ -46,7 +46,10 @@ FactoryGirl.define do
event.commercials << build(:event_commercial, commercialable: event)
event.difficulty_level = build(:difficulty_level, program: event.program)
event.track = build(:track, program: event.program)
event.room = build(:room, program: event.program)
unless (venue = event.program.conference.venue)
venue = create(:venue, conference: event.program.conference)
end
event.room = build(:room, venue: venue)
event.comment_threads << build(:comment, commentable: event)
end
end